Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between timezones America/Los_Angeles and US/Pacific and PST8PDT?

I need to convert a bunch of dates in a MySQL database from Pacific time (America/Los_Angeles) to UTC. I found a great SO answer on how to do this.

During my tests and preparation, I'm finding that I'm getting the same time conversions when using any of the following time zone names:

  • America/Los_Angeles
  • US/Pacific
  • PST8PDT

So my questions are the following:

  • Are these all just aliases to the same thing? Or are there actual differences between them at some point in time?
  • If I want to provide a list of timezones to users on a website, would it be better to give them selections from the America group of names, or the US group of names?
like image 724
Tauren Avatar asked Nov 29 '10 23:11

Tauren


People also ask

Is America Los_angeles same as PST?

Los Angeles is 1 hour ahead of PST. If you are in Los Angeles, the most convenient time to accommodate all parties is between 10:00 am and 6:00 pm for a conference call or meeting. In PST, this will be a usual working time of between 9:00 am and 5:00 pm.

What does PST8PDT mean?

The current PST8PDT time zone offset is:Daylight Saving Time: This time zone changed to daylight saving time (DST) at 2:00 AM on Sunday, Mar 13, 2022. The GMT offset is currently UTC/GMT -7 hours (PDT). It will change back to standard time at 2:00 AM on Sunday, Nov 6, 2022.

How many time zones in usa?

The map shows the six time zones into which the United States is divided. The territory of the 50 US states extends over eight standard time zones, from UTC (GMT) −4 to −11 hours. There are six designated US time zones; and there are four time zones in the contiguous USA.


2 Answers

US/Pacific and PST8PDT both belong to the "other" timezones, which come with this warning:

Please do not use any of the timezones listed here (besides UTC), they only exist for backward compatible reasons.

They should all refer to the same timezone, compare:

http://www.travelmath.com/time-zone/PST8PDT
http://www.travelmath.com/time-zone/US/Pacific
http://www.travelmath.com/time-zone/America/Los_Angeles

As such, you should use America/Los_Angeles, which incidentally should also be a pretty "natural" and easy thing to select for users.

like image 116
deceze Avatar answered Oct 06 '22 14:10

deceze


I ran into an issue with the parallel US/Eastern, Americas/New_York, and EST5EDT. Here is what I discovered.

For dates after the Uniform Time Act of 1966 went into effect in 1967, these timezones are all identical. Also the US enforced standard DST rules during the World Wars, so they are all identical 1918-1919 and 1942-1945.

For any date before 1918, between 1920 and 1941 inclusive, and between 1946 and 1966 inclusive, EST5EDT will always be identical to EST. PST8PDT will always be identical to PST.

Prior to 1967, Americas/New_York will provide the time as observed in New York City. So Daylight Savings Time will follow the rules in place by the NYC municipal or NY state government. Any date before 1883 Nov 18 12:03:58 will be in local mean time with an offset of -4:56:02 from UTC. For Americas/Los_Angeles any time before 1883 Nov 18 12:07:02 will be local mean time with an offset of -7:52:58 from UTC. Between 1883 and 1967, Los Angeles follows the LA and California Daylight Savings rules.

Odd things can happen if you have multiple systems where one assumes PST8PDT and the other assumes Americas/Los_Angeles. Data might look fine for anything recent. A birthdate for example, from the summer of 1966 might get moved an hour, then truncated so it appears to be on the prior day.

And just for extra fun if you are dealing with old dates in Alaska, you need to remember that Alaska was Purchased from Russia. Dates before 1867 Oct 18 are on the other side of the international date line and use the Julian, not Gregorian Calendar. So Juneau, for example, went from 6 Oct 1867 (Julian) +15:02:19 to 18-Oct-1867 (Gregorian) -8:57:41.

like image 22
MikeD Avatar answered Oct 06 '22 13:10

MikeD