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?
解决方案
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:
As such, you should use America/Los_Angeles, which incidentally should also be a pretty "natural" and easy thing to select for users.