32 bit Ruby uses 32 bits to represent the time, therefore it has a valid range from 13 Dec 1901 20:45:54 UTC
to 19 Jan 2038 03:14:07 UTC
, as these are the minimum/maximum signed integer values representable with 32 bits, with time 0 being unix epoch time (1 Jan 1970 00:00:00 UTC
).
64 bit Ruby uses 64 bits to represent the time, therefore it has a valid range of basically anything.
To fix this, you could look into using the DateTime
class, which is not limited to 32 bits.