UTC time and local time

Source: Internet
Author: User
Tags time zones
Each region has its own local time, and the time conversion problem on the Internet and radio communication is particularly prominent. Record here for memo.

The whole earth is divided into twenty-four time zones, each of which has its own local time. For international radio communication, a unified time is used for the sake of unification, called Universal coordination Time (UTC, Universal Time Coordinated ). The UTC time is the same as the Greenwich Mean Time (GMT, Greenwich Mean Time. In this article, UTC and GMT have the same meaning.

The Beijing Time Zone is GMT + 8, which is eight hours ahead of UTC. The Date Field in the email header is recorded as + 0800. If there is such a line in the email header:

Date: Fri, 08 Nov 2002 09:42:22 + 0800

It indicates that the mail is sent at 09:42 (22 seconds) on Friday, January 1, November 8. The local time of the mail is eight hours ahead of UTC (+ 0800, that is, UTC time ). The Date Field of the email header uses the 24-hour clock instead of the AM and PM to mark the previous afternoon.

Take the email sending time as an example. If you want to convert this time to UTC, you can use the following formula:

UTC + time zone Difference = local time

The Time Zone difference is positive in the east and negative in the West. Here, the UTC + 8 Zone Time Zone difference is recorded as + 0800,

UTC + (+ 0800) = Local (Beijing) time (1)

So, UTC = local time (Beijing Time)-0800 (2)

0942-0800 = 0142

That is, UTC is 01:42:22 that day. If the result is a negative number, it means the day before UTC. Adding the negative number to 2400 is the time of the day before UTC. For example, if the local (Beijing) Time is 0432 (04:32 in the morning), the UTC time is 0432-0800 =-0368, and the negative number means the previous day,-0368 + 2400 = 2032, 08:32 the previous day.

The Time Zone of New York is the West five zone, which is five hours behind UTC and recorded as-0500:

UTC + (-0500) = New York time (3)

UTC = New York time + 0500 (4)

Compare (2)-(4,

UTC = Beijing Time-0800 = New York time + 0500 (5)

That is, Beijing time = New York time + 1300 (6)

That is, Beijing time is 13 hours ahead of New York time, in the format of (6,

New York time = Beijing Time-1300 (7)

In late April, when New York switched to daylight saving, it became an hour earlier than the standard time in New York. It became the standard time in the West 4 region and became-0400.

When UTC + (-0400) = New York Region, apply the above formula,

Beijing time = Daylight Saving Time in New York + 1200

Daylight Saving Time in New York = Beijing Time-1200

Among these conversions, the most important formula is

UTC + time zone Difference = local time

The Time Zone difference is positive in the east and negative in the West. For example, the UTC + 8 (Beijing) region is + 0800, the west Five (New York) region is-0500, the California region is West eight, the-0800, the central United States time zone is west six, and the-0600, the US Mountain Time Zone is the west seven district,-0700, the Pacific Ocean time zone is the West eight district,-0800, and the summer time is used to become-0700. The German time zone is located in the East 1 region, with a value of + 0100 and a value of + 0200 in summer.

Most email programs, such as Outlook Express, convert the time into local time before displaying the time. For example, the Date Field of the email is:

Date: Fri, 08 Nov 2002 09:42:22 + 0800

Outlook Express is displayed as follows:

Date: Thur, 07 Nov 2002 08:42:22, converted Beijing time into New York time, and converted the 24-hour format into 12-hour format. Of course, in order to convert the time correctly, both the sender and receiver's computer must set the correct time zone. Here, the sender's time zone must be set to the UTC + 8 Beijing time zone, and set my time zone to the west Five.

For the sake of convenience, I put the clock displayed in real time in New York, California and Beijing to save the trouble of computing.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.