3 ms·
> the obvious solution is computers should simply measure seconds since the epoch Obvious solutions are usually wrong, and this one is no exception. How do yo
by duskwuff 5y ago
> the obvious solution is computers should simply measure seconds since the epoch
Obvious solutions are usually wrong, and this one is no exception.
How do you represent a time which lies well in the future, like "January 1, 2030, midnight GMT" in that format? Since leap seconds are only announced 6 months in advance, any number you pick right now could be off by as much as 15-20 seconds in either direction. Conversely, as those leap seconds are decided upon, the human-readable representation of that number could change unpredictably.
- zajio1am 5y ago> How do you represent a time which lies well in the future, like "January 1, 2030, midnight GMT" in that format? Problem is that "January 1, 2030, midnight GMT" is not time moment itself, it is just human label for some time moment. Time is a physical quantity measurered in seconds. We do not know which time will be represented by label "January 1, 2030, midnight GMT" in the future, because that might change. That is why such representation it is unusable as a timestamp.
- duskwuff 5y agoAnd that's ridiculous. Outside of special cases like changes to DST rules, people expect to be able to perform arithmetic on dates and get results which don't vary over time, no more than other physical measurements and operations change over time.
- nine_k 5y agoAs long as you can afford a half-minute precision for an event 8.5 years ahead, you still can assume that simple datetime arithmetic works. This is ignoring the complexity of the reality. If you need a better precision, you store your date as a label saying "local midnight of January 1st 2030", and adjust its mapping to a particular number of seconds since epoch as time passes, or maybe do something even more complex. This is adjusting to the complexity of the reality. The third way, mandating the reality to not be complex, is not available.
- simondotau 5y agoIt's not ridiculous. One is a measurement of linear time, the other is a series of context-sensitive human labels tied to planetary movements. Conceptually they are not the same thing, even though we try very hard to make them the same.
- denton-scratch 5y agoWell, you can't, because GMT is not well-defined. It's been through numerous revisions, so that if you want to specify a time in GMT, you also need to state which revision of GMT you are using. GMT is now an obsolete timescale. GMT has generally been some form of "Mean Solar Time at Greenwich". If you're specifying a time well in the future, then for the same reason as UTC in the future is ill-defined, so is Mean Solar Time at Greenwich. If the speed of the Earth's rotation has changed (it will have) then there's no way of knowing the numer of seconds between now and "January 1, 2030, midnight GMT". The term is nowadays used to refer to UTC, but in a handwavy way. The BBC refers to all its time announcements as being something "GMT", which they enunciate in a smug, jingoistic tone of voice. It sickens me (and I'm a brit). Here's an excellent article detailing the relationships between different timescales, paying particular attention to the "sordid history of GMT". https://www.ucolick.org/~sla/leapsecs/timescales.html https://www.ucolick.org/~sla/leapsecs/timescales.html
- michael1999 5y agoAre you describing a celestial event, or scheduling a New Year’s party for humans? For the former, you are probably already using TAI (or GPS). For the latter, use an ISO 8601 string, and call it Europe/London instead of GMT. As you recognize - the mapping of human dates to celestial time is unstable. Don’t pretend it is by using a number until you need to.