The Year 2038 Problem

I'm far from the first to write about the 32-bit time_t overflow in January of 2038. But I had it in my brain for long enough to write this, and I learned how to get non-float datatypes out of JavaScript so that was a bonus.

The current date and time. One timestamp is the old time_t, the other is the newer 64-bit timestamp that counts milliseconds. It won't overflow for a few million years.

32-bit timestamp

64-bit timestamp

A milestone en route to the overflow: the timestamp in base-10 hits 2,000,000,000 in 2033.

Timestamp 2000000000

And finally, the last second before the overflow and the overflow itself.

Pre-Year 2038 (32-bit)

Year 2038 (32-bit)