Coordinated Universal Time (UTC) is the official world time. Localized times can be calculated through addition or subtraction on the current UTC time. For most timezones, this conversion uses integer multiples of hours (i.e. +1:00, +2:00, -3:00, etc). Typical dates in UTC can look like these:

+

Coordinated Universal Time (UTC) is the official world time. Localized times can be calculated through addition or subtraction to the current UTC time. For most timezones, this conversion uses integer multiples of hours (i.e. +1:00, +2:00, -3:00, etc). Typical dates in UTC can look like these:

<pre>

<pre>

2007-06-07 04:00 UTC

2007-06-07 04:00 UTC

Line 17:

Line 17:

There are several ways:

There are several ways:

−

# Do mental arithmetic. You need to know the offset of your timezone and add it to the current UTC time. A table with some time zone offsets is below.

+

# Do mental arithmetic. You need to know the offset of your timezone and add it to the current UTC time. A table with some time zone offsets is presented below.

−

# You can use the command line tool ''date'' for this. This only works when you use a machine that is configured to display your time zone. <pre>$ date -d '2007-06-07 04:00 UTC'</pre> This would print: <pre>Thu Jun 7 00:00:00 EDT 2007</pre> for someone using Eastern Daylight Time.

+

# You can use the command line tool ''date'' for this. This conversion only works when you use a machine that is configured to display your time zone. <pre>$ date -d '2007-06-07 04:00 UTC'</pre> This would print: <pre>Thu Jun 7 00:00:00 EDT 2007</pre> for someone using Eastern Daylight Time.

# You can use an [http://www.timeanddate.com/worldclock/converter.html online time calculator].

# You can use an [http://www.timeanddate.com/worldclock/converter.html online time calculator].

== How can I convert my/any local time into UTC? ==

== How can I convert my/any local time into UTC? ==

−

# Do mental arithmetic. You only need to substract the offset of your timezone from your local time to get UTC. A table with some time zone offsets is below.

+

# Do mental arithmetic. You only need to subtract the offset of your timezone from your local time to get UTC. A table with some time zone offsets is presented below.

−

# You can use the commandline tool ''date'' for this.

+

# You can use the commandline tool ''date'' for this conversion.

## You can use the -d option to provide a date to convert: <pre>$ date -u -d "2007-06-07 00:00 EDT" +"%Y-%m-%d %H:%M %Z" </pre> Yields the converted time in UTC: <pre>2007-06-07 04:06 UTC</pre>

## You can use the -d option to provide a date to convert: <pre>$ date -u -d "2007-06-07 00:00 EDT" +"%Y-%m-%d %H:%M %Z" </pre> Yields the converted time in UTC: <pre>2007-06-07 04:06 UTC</pre>

## Ignore the -d option to use the current system time.<pre>$ date -u +"%Y-%m-%d %H:%m %Z"</pre> Yield the current converted time in UTC:<pre>2007-06-29 20:06 UTC</pre>

## Ignore the -d option to use the current system time.<pre>$ date -u +"%Y-%m-%d %H:%m %Z"</pre> Yield the current converted time in UTC:<pre>2007-06-29 20:06 UTC</pre>

Line 30:

Line 30:

== Table of time zones ==

== Table of time zones ==

−

A very complete, albeit somewhat intimidating list of time zones listed by their UTC conversion factor can be found [http://en.wikipedia.org/wiki/List_of_time_zones on Wikipedia]. They use the convention UTC+X to sort the zones. If you lived in New York, for example, you would look under UTC-4. If you liven in Berlin using CET, you would look under UTC+1.

+

A very complete, albeit somewhat intimidating list of time zones listed by their UTC conversion factor can be found [http://en.wikipedia.org/wiki/List_of_time_zones on Wikipedia]. They use the convention UTC+X to sort the zones (UTC equals the GMT). If you lived in New York, for example, you would look under UTC-5, during summer (EDT) you would look under UTC-4. If you liven in Berlin using CET, you would look under UTC+1, or UTC+2 in the summer.

Latest revision as of 20:46, 18 March 2016

Contents

Coordinated Universal Time (UTC) is the official world time. Localized times can be calculated through addition or subtraction to the current UTC time. For most timezones, this conversion uses integer multiples of hours (i.e. +1:00, +2:00, -3:00, etc). Typical dates in UTC can look like these:

A very complete, albeit somewhat intimidating list of time zones listed by their UTC conversion factor can be found on Wikipedia. They use the convention UTC+X to sort the zones (UTC equals the GMT). If you lived in New York, for example, you would look under UTC-5, during summer (EDT) you would look under UTC-4. If you liven in Berlin using CET, you would look under UTC+1, or UTC+2 in the summer.