"At nanosecond resolution (if I've done my arithmetic right), 128 bits will represent a span of 1 x 10²² years, or much longer than from the big bang to the estimated date of fuel exhaustion of all stars. So I think I'll arbitrarily set an epoch 14Bn years before the UNIX epoch and go with that. The time will be unsigned - there is no time before the big bang."
So, yes, if you're content with nanosecond resolution...
Until we ditch leap-seconds, we cannot predict how many seconds there will be until some timestamp in the future, since that depends on what the director of the Paris Observatory decides twice a year.
And on top of that, time-zones are political decisions, so even without leap-seconds, it is anyone's guess how long time there is to 2026-01-01 09:00 in Mississippi.
@simon_brooke @catgirlQueer So there is no "fix it once and for all" solution to timekeeping, and the best and most robust strategy will always be store timestamps the way the user provided them, and interpret them as best you can, given the knowledge available to you, when you do.
<eleanor>
in reply to Vashti • • •The Witch of Crow Briar
in reply to <eleanor> • • •Rexo the Trans Bus š³ļøāšš³ļøāā§ļøš
in reply to The Witch of Crow Briar • • •@crowbriarhexe@tech.lgbt
eblu š
2025-07-04 22:12:48
The Witch of Crow Briar
in reply to Rexo the Trans Bus š³ļøāšš³ļøāā§ļøš • • •eblu š
in reply to Vashti • • •Sensitive content
Show Bookmark | Archive of Our Own
archiveofourown.orgSimon Brooke
in reply to Vashti • • •and this is why we shouldn't store numbers in fixed width fields, or compute using 32 or 64 or 128 bit or any other fixed size integers.
Bignum arithmetic has been a solved problem in computing since Maclisp in the 1960s.
#Lisp
Catelyn
in reply to Simon Brooke • • •Simon Brooke
in reply to Catelyn • • •@catgirlQueer As I myself wrote, years ago,
"At nanosecond resolution (if I've done my arithmetic right), 128 bits will represent a span of 1 x 10²² years, or much longer than from the big bang to the estimated date of fuel exhaustion of all stars. So I think I'll arbitrarily set an epoch 14Bn years before the UNIX epoch and go with that. The time will be unsigned - there is no time before the big bang."
So, yes, if you're content with nanosecond resolution...
github.com/simon-brooke/post-sā¦
cons space
GitHubPoul-Henning Kamp
in reply to Simon Brooke • • •@simon_brooke @catgirlQueer
Fun fact:
Until 1972-01-01Z we used rubber-time, because astrometry is not nearly as constant as most people seem to think.
But it is worse than that.
We literally have no idea how long nanoseconds took before 1958-01-01Z
If you go back before observations of solar eclipses, we even barely know how long days took.
Any epoch before 1972-01-01Z by defintion causes wrong timekeeping.
Poul-Henning Kamp
in reply to Poul-Henning Kamp • • •@simon_brooke @catgirlQueer
Also:
Until we ditch leap-seconds, we cannot predict how many seconds there will be until some timestamp in the future, since that depends on what the director of the Paris Observatory decides twice a year.
And on top of that, time-zones are political decisions, so even without leap-seconds, it is anyone's guess how long time there is to 2026-01-01 09:00 in Mississippi.
Poul-Henning Kamp
in reply to Poul-Henning Kamp • • •So there is no "fix it once and for all" solution to timekeeping, and the best and most robust strategy will always be store timestamps the way the user provided them, and interpret them as best you can, given the knowledge available to you, when you do.
Poul-Henning Kamp
in reply to Poul-Henning Kamp • • •And as for nanosecond resolution: Now you also need to think about which relativistic reference frame to use.