Home > Common Problem > body text

How to convert UTC time to Beijing time

爱喝马黛茶的安东尼
Release: 2019-07-25 16:32:13
Original
158316 people have browsed it

How to convert UTC time to Beijing time

The entire earth is divided into twenty-four time zones, and each time zone has its own local time. In international radio communications, for the sake of uniformity, a unified time is used, called Universal Time Coordinated (UTC). UTC is the same as GMT (Greenwich Mean Time), which is the same as the local time in London, UK. In this article, UTC and GMT have exactly the same meaning.

The Beijing time zone is the East Eighth District, eight hours ahead of UTC, and is recorded as 0800 in the Date field of the email header. If there is such a line in the email header:

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

, it means that the local time of the place where the letter is sent is 2002 November 8th, Friday, 9:42 am (22 seconds), the local time in this place is eight hours ahead of UTC (0800, which is the East Eighth District time). The Date field of the email header uses a twenty-four-hour clock instead of using AM and PM to mark morning and afternoon.

Related recommendations: "FAQ"

Take the sending time of this email as an example. If you want to convert this time into 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 time zone difference of East Eighth District is recorded as 0800,

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

Then, UTC = local time (Beijing time))- 0800 (2)

0942 - 0800 = 0142

That is, UTC is 1:42:22 a.m. that day. If the result is a negative number, it means that it is the day before UTC. Add this negative number to 2400 to get the UTC time on the previous day. For example, the local (Beijing) time is 0432 (four thirty-two in the morning), then UTC is 0432 - 0800 = -0368, the negative sign means the previous day, -0368 2400 = 2032, which is eight o'clock in the evening of the previous day Thirty-two points.

The time zone of New York is the West Fifth Zone, five hours behind UTC, recorded as -0500:

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

UTC = New York time + 0500 (4)

Compare equation (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 thirteen hours ahead of New York time. From equation (6),

New York time = Beijing time - 1300 (7)

In late April, New York switched to daylight saving time, also known as daylight saving time, which is one hour ahead of standard New York time and actually became the standard time in the West Fourth District, becoming -0400.

UTC + (-0400) = New York Daylight Saving Time, applying the above formula,

Beijing Time = New York Daylight Saving Time + 1200

New York Daylight Saving Time = Beijing Time - 1200

In 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 East 8th District (Beijing) is 0800, the West 5th District (New York) is -0500, California is the West 8th District, which is -0800, the Central Time Zone of the United States is the West 6th District, -0600, and the American Mountain Time Zone is the West 7th District. -0700, the Pacific time zone is the West 8th zone, -0800, using daylight saving time in the summer, becomes -0700. The German time zone is East Zone 1, 0100, which changes to 0200 in summer.

When most email programs, such as Outlook Express, display the time, the computer program converts the time to local time before displaying it. For example, the Date field of the email is: Date: Fri, 08 Nov 2002 09:42 :22 0800

The above is the detailed content of How to convert UTC time to Beijing time. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template