Skip to main content

in reply to Vashti

VERY nsfw text

Sensitive content

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

#lisp
in reply to Simon Brooke

@simon_brooke 264 microseconds is approximately 580 000 years (more than that, rounding down), so 264 is more than plenty
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…

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.

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.

in reply to Poul-Henning Kamp

@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.
⇧