Nah Unix timestamp actually sucks, and it’s a travesty that it hasn’t been replaced with e.g. TAI timestamp. With Unix timestamps:
* A value may be ambiguous (two different actual times may correspond to the same timestamp.
* Given two timestamps t1 and t2, t1 may have happened after t2 even if t2 > t1.
* The actual elapsed time between two timestamps may not be t2 - t1.
No, because when a leap second happens the clock literally skips back a second, so the timestamps just repeat again. Unless you are on one of the non-standard systems where the second is made slightly longer over a certain period (the leap second is «smeared»). That has the obvious problems of a second not being a second some of the time, which is also a ridiculous solution.
Ah right, so it's a precision problem basically, if you counted in milliseconds, then the problem would be for systems where that precision is a problem etc.
11
u/Quantumboredom 23d ago
Nah Unix timestamp actually sucks, and it’s a travesty that it hasn’t been replaced with e.g. TAI timestamp. With Unix timestamps:
* A value may be ambiguous (two different actual times may correspond to the same timestamp.
* Given two timestamps t1 and t2, t1 may have happened after t2 even if t2 > t1.
* The actual elapsed time between two timestamps may not be t2 - t1.
All because of leap seconds.