7

IANA maintains many time zones in cities that represent the world. I don't want to maintain a list of all zones in a UI (because it's a third party system and would be unpractical to do so) and offer just the 4 main choices. Now which IANA value best represents these choices?

  • Eastern time zone: America/New_York
  • Central time zone: America/Chicago
  • Mountain time zone: America/Denver
  • Pacific time zone: America/Los_Angeles

I picked these cities to map for each zone. Are these appropriate choices?

simbolo
  • 7,279
  • 6
  • 56
  • 96

1 Answers1

11

Yes, I should say that they are.

One way to see it is, inspect the list of time zones, link below. It lists the following time zones as deprecated:

  • US/Eastern: Link to America/New_York
  • US/Central: Link to America/Chicago
  • US/Mountain: Link to America/Denver
  • US/Pacific: Link to America/Los_Angeles

I hope that you are aware that even though these four zones cover most of mainland USA (excluding Alaska), they do not cover all of it. One zone not covered is America/Phoenix, which, if I recall correctly, does not use summer time (DST) and therefore cannot be covered by any of the four main time zones. The list I have linked to contains 28 canonical time zone IDs in the US, so this is the minimum number you will need if you want to cover every square mile of USA.

Bonus info: The corresponding time zones for Canada would be America/Toronto, America/Winnipeg, America/Edmonton and America/Vancouver.

Link: List of tz database time zones on Wikipedia

Ole V.V.
  • 81,772
  • 15
  • 137
  • 161
  • 2
    America/Denver is wrong for Arizona. Arizona does not observe daylight savings time (except inside the Navajo nation). That's why there's an America/Phoenix separate from America/Denver. – Tom Nov 08 '21 at 11:39
  • Yes, Tom, that’s what I am saying. :-) – Ole V.V. Nov 08 '21 at 11:49
  • 1
    It's not true that you need 28 time zones for now to the future. It's true that you need 28 time zones for historical reasons depending on how far back your time data goes. If all of your time data is now to the foreseeable future, you need 7, not 28. – Tom Dec 22 '21 at 09:32
  • 1
    8 actually. The four mentioned in the answer, `America/Phoenix` as discussed. Then `Pacific/Honolulu` for Hawaii, `America/Anchorage` for most of Alaska, and then `America/Adak` for the Aleutians in Western Alaska. Everyone forgets about Adak. It's UTC-10 like Hawaii, but unlike Hawaii it _does_ do daylight saving time. That's just states. If you also want US territories, the list is even longer. – Matt Johnson-Pint Jul 31 '23 at 18:18