Posted by pera 10/27/2025
And then you can translate that time to any other timezone with ease, knowing that you are referencing a specific hour in physical time that only ever happened once.
"Falsehoods programmers believe about time"
This assumption can break with:
* Leap seconds
* Calendar and time zone changes
* (In exotic circumstances) Relativity
I figured that scheduling lights to turn on at <0 AM + wake up time> was a good approach... We got a surprise early wake up last year, so I ended up changing the formula to <4 AM - 4 hours + wake-up time>.
The timestamp gives you a chance to recognize stale/orphraned lock files in case of crashes based on their age.
UTC has most of the same wacky timezone problems, just less often.
Unless standardization has improved, how+when the second is smeared(if at all) means timestamps from the same system aren't usefully subtractable without communicating a separate time skew calendar.
That said, time is a big topic, and everything has different requirements but migrating to TAI and treating UTC as yet another human readable time zone has solved more (admittedly application specific) problems than it created.