Alt text:
It’s not just time zones and leap seconds. SI seconds on Earth are slower because of relativity, so there are time standards for space stuff (TCB, TGC) that use faster SI seconds than UTC/Unix time. T2 - T1 = [God doesn’t know and the Devil isn’t telling.]
Not even going to general relativity, as this comics suggests to experience time slowing down due to gravity, the events are not just at time, but also at particular location in space relative particular inertial system. Not specifying it, and not specifying the inertial system for which the final answer is needed makes it impossible to calculate even in special relativity, without effects of gravity.
Here’s the shortlist of horrors I’ve had to deal with in my career:
- Mixed US/ROW short date formats - DD/MM/YY, MM/DD/YY
- mixed timezones in the same column
- the wrong timezone (marked as PDT but actually UTC, or sometimes the other way around)
- clock drift
- timezones again…because timezones suck
- historical timezones
- NTP configurations
Things I’ve read about but haven’t needed to deal with personally:
- leap seconds
- clock slew vs skip
- hardware clocks
- PTP
The one thing I really don’t care about is relativity
From the wikipedia:
TCB ticks faster than clocks on the surface of the Earth by 1.550505 × 10−8 (about 490 milliseconds per year)
It’s amazing that this level of detail is relevant to anything.
Without considering this, most people wouldn’t be able to drive anywhere they haven’t been before anymore.
“Wouldn’t be able to” is a bit of a stretch, since Thomas Maps existed long before GPS. But it wouldn’t be so easy as it is now.
That’s me in the bottom right corner over there.
We use datediff in sql and let God handle the rest.
“Oh but they’re in different time zones” “Oh did you account for if one is in day light savings and other isn’t” “Aren’t some of these dates stored in UTC and some local?”
Are all problems I do not care about.
This is why we should just move to a universal time zone and stop with the day light savings.
We have that, it’s called Unix time, and the only thing it doesn’t account for is time dilation due to relativity.
If your system hasn’t been upgraded to 64-bit types by 2038, you’d deserve your overflow bug