← Back to context

Comment by themafia

8 hours ago

66 days + 12 hours are 5,745,600,000,000,000 ns. The log2 of this is 52.351...

Javascript and some other languages only have integer precision up to 52 bits then they switch to floating point.

Curious.

It's 32 bits of milliseconds, right? Hm, no, that would overflow much sooner (49.7 days).

Bingo! Someone decided to store timestamps in float64 which has 52 bit mantissa, and the time functions break when losing precision.