Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a difference between the UTC and Etc/UTC time zones?

In the PHP documentation, list of supported time zones, UTC is listed twice:

  • UTC
  • Etc/UTC

Is there any conceptual difference between those two, or are they just synonyms?

like image 291
BenMorel Avatar asked Jan 02 '13 20:01

BenMorel


People also ask

Where is ETC time zone?

The Eastern Time Zone (ET) is a time zone encompassing part or all of 23 states in the eastern part of the United States, parts of eastern Canada, the state of Quintana Roo in Mexico, Panama, Colombia, mainland Ecuador, Peru, and a small portion of westernmost Brazil in South America, along with certain Caribbean and ...

What are the different UTC time zones?

From east to west they are Atlantic Standard Time (AST), Eastern Standard Time (EST), Central Standard Time (CST), Mountain Standard Time (MST), Pacific Standard Time (PST), Alaskan Standard Time (AKST), Hawaii-Aleutian Standard Time (HST), Samoa standard time (UTC-11) and Chamorro Standard Time (UTC+10).

Is UTC time the same everywhere?

UTC is the Coordinated Universal Time and is the same everywhere. From Wikipedia: Coordinated Universal Time (French: Temps universel coordonné), abbreviated as UTC, is the primary time standard by which the world regulates clocks and time.


2 Answers

Firstly, to answer the question:
There is NO difference between UTC and Etc/UTC time zones.

Etc/UTC is a timezone in the Olson-timezone-database (tz database), also known as IANA-timezones-database, in which all timezones conform to a uniform naming convention: Area/Location.

Since, some timezones cannot be attributed to any Area of the world (i.e. continents or oceans), the special Area Etc (Etcetera) was introduced. This applies mainly to administrative timezones such as UTC.
Thus, to conform with the naming convention, the universal coordinated time(zone) is named Etc/UTC in the tz database.

For administrative timezones other than UTC (e.g. GMT+4, GMT-8), the tz database uses POSIX-style signs in the zone-names. POSIX has positive signs for zones that are behind Greenwich (west of Greenwich) and negative signs for zones that are ahead of Greenwich (east of Greenwich).

POSIX-style signs in timezones are the opposite of the definition of timezones in the nowadays widespread and mostly used ISO 8601. In the ISO 8601 timezone format, negative signs indicate a zone is behind UTC (west of Greenwich) and positive signs indicate a zone is ahead of UTC (east of Greenwich). This is what has become the standard usage nowadays.

Possible reasons for the opposite definition in POSIX are:

  • POSIX is part of UNIX, which was developed in the USA, which is behind UTC (west of Greenwich). The POSIX format allows the US timezones to be represented as EST5, PST8, i.e. omitting the (+) sign.
  • Usually, computer programs and operating systems internally do everything in UTC time. With POSIX-style signs you can add time and timezone in order to get UTC time. Example: "03:30 PST8" or "03:30 GMT+8" mean it is "11:30 UTC".
like image 120
Andreas Rayo Kniep Avatar answered Sep 17 '22 12:09

Andreas Rayo Kniep


Etc/UTC is the time zone whose display name is UTC. That is, they're long and short names for the same timezone, per IANA's time zone database.

like image 37
David Schwartz Avatar answered Sep 18 '22 12:09

David Schwartz