The end of the world is nigh
According to Ruby, the world ends (or, at least, is reconfigured) on Tuesday the 19th of January 2038 at 7 seconds past 3.14am.
>> Time.utc(2038, 1, 19, 3, 14, 7, 999999)
=> Tue Jan 19 03:14:07 UTC 2038
>> Time.utc(2038, 1, 19, 3, 14, 7, 999999).succ
=> Fri Dec 13 20:45:52 UTC 1901
This is an artefact of representing time as an integer counting from the epoch, but given that a Fixnum
will automatically roll over into a Bignum
when it reaches 2**30
, it's somewhat surprising that a similar transformation isn't performed internally in Time
to allow us to represent dates and times beyond 2038-01-19.
Disagree? Found a typo? Got a question? Email me at craig@barkingiguana.com.