The US and Daylight Saving Time

From https://www.timeanddate.com/time/us/arizona-no-dst.html

Most of the US observes DST, Hawaii and MOST of Arizona doesn't.

The Navajo Nation, a semi-autonomous Native American territory, follows the United States DST schedule. It lies in northeastern Arizona, northwestern New Mexico, and southeastern Utah.

A part of the Hopi Nation, which lies within the Navajo Nation, follows Arizona's no-DST rule. To confuse matters more, there is also an even smaller Navajo Nation territory within the Hopi Nation within the Navajo Nation. In addition to this, there is another Hopi area adjacent to the main Hopi Nation territory.

As a result, if driving the correct route from the Arizona state border through both Navajo and Hopi areas to the other side one can end up changing one's clock 7 times! For example: Tuba City (Navajo) and Moenkopi (Hopi) are only a couple of miles apart, but they have a 1-hour time difference during the summer. Jeddito (Navajo), in the middle of Hopi Nation territory, is 1 hour ahead of the surrounding areas during summer.


Heh. :)
"DST" or, "how to not solve a non-problem by creating a multitude a complex little problems".

Recently I've had to reimplement Windows' DST logic in my own code, including reading the DST data from the registry and correctly converting UTC times to local times. Windows' internal representation has a few fun gotchas such as
* "October 5, Sunday" as a transition time doesn't mean the 5th of October, it means the 5th Sunday of October, or the 4th if that October only has four Sundays.
* The data structure only stores a daylight and a standard date for transitions. The former specifies when the timezone changes to DST UTC offset and the latter when it transitions to normal UTC offset. Timezone specifications for the Southern hemisphere appear in reversed order (with the period during DST crossing the new year) and the DST periods are specified year by year, so putting everything in an efficient lookup data structure involved a fair bit of massaging the data. I still have no idea how Windows handles timezones with more than one transition in a single year. Yeah, those exist, because people just can't leave well enough alone.
The US federal government has given states and territories the ability to opt out of DST if they want.

US Energy Policy Act of 2005
https://www.timeanddate.com/laws/us/energypolicyact2005.html

WA State is one state considering to forgo using DST.

Unless all US States opt out that will make your own code even more complicated, helios.

Looks like DST is going away in the EU as well.
https://www.timeanddate.com/news/time/eu-scraps-dst.html
Nah. Whoever has to maintain the timezone tables gets to deal with that nonsense. My job is done, in that respect.
Whoever has to maintain the timezone tables gets to deal with that nonsense
That was me two jobs ago, in transportation. Was always a pain that reached the levels of a minor crisis when Bush Jr. changed the US DST rules.
Topic archived. No new replies allowed.