r/AskComputerScience • u/grawmpy • Dec 09 '25
32-bit computers hit a time calculation wall in 2038. Will they most likely all be phased out by then?
The wall hits 03:14:07 UTC on Tuesday, January 19, 2038. After this the time calculation will roll back over to either December 13, 1901 or January 1, 1970 depending on the implementation. Does anyone think 32-bit architecture computers will still be in service by 2038?
143
Upvotes
View all comments
Show parent comment
1
u/TheSkiGeek Dec 09 '25
Have you actually seen a production system that is storing UNIX-style timestamps in a floating point number? That seems like a terrible idea on so many levels.
Typically either you’re going to use a signed 64-bit integer (not in the C89 spec but a common compiler extension), or define a struct that holds two 32-bit integers and functions to work with them.
Or you’re going to use a platform specific type that works with the platform’s API for dates and times. (Which, again, I’ve never seen one that is ‘natively’ floating point, but maybe it exists somewhere.) If you’re on a POSIX platform and it has 64-bit clocks typically
time_twill be some kind of 64-bit integer as well.