Better HN
topnewbestaskshowjobs
Log inSign up

mjtardiff

10 karma · joined May 7, 2023 (3y ago) · 1 submissions

Submissions

comment 2y ago · link · parent

Keep time and calculate intervals in epoch time, for sure. But the DST/ST switch happens at 02:00 local time on the date of the switch (always a Sunday morning in the US), and so since the OP points out that the bug only happens when DST switches at 23:00 PT…that’s why. The code was doing time-switching wrong in all zones.

But as another poster points out, when a server lives in one time zone and is used in another, all hell can easily break loose when deciding what to show the local user.