News for hackers. Stuff that matters.
Re:It's Time for a Change: Datetime.utcnow() Is Now Deprecated by macintux on Sunday November 19, 2023 @11:23AM (#38334114)
> If computers do need to know, then they’ll need to know a specific store with a physical location. That gives you the time zone.

Mapping a location to a time zone seems fraught with peril. I’d store the local time zone explicitly.

Re:It's Time for a Change: Datetime.utcnow() Is Now Deprecated by amluto on Sunday November 19, 2023 @11:48AM (#38334477)
Indeed. And anyone near a time zone boundary looking at an online map of store locations doesn’t want to see “opens at 6AM” or whatever — they want to know whether the store is open.
Re:It's Time for a Change: Datetime.utcnow() Is Now Deprecated by JJMcJ on Sunday November 19, 2023 @12:20PM (#38334907)
Indeed. It's not as bad as mapping address => sales tax (no ZIP Code isn't good enough), but only because it doesn't change as often and tends to follow county boundaries when it doesn't follow state boundaries.

Another good example. Arizona doesn't follow Daylight Savings, but the Navajo Nation, which includes the Four Corners area and is in three states, does observe the change.

However the Hopi reservation, completely surrounded by Navajo territory, is entirely in Arizona, and does not observe DST. So it can get quite complicated and it's not enough to say "Arizona doesn't have Daylight Savings Time".