r/AskComputerScience • • 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?

147 Upvotes

138 comments sorted by

View all comments

Show parent comment

1

u/flatfinger Dec 09 '25

In a language which lacks 64-bit integer types, use of a double-precision float for values that would be too big for 32-bit integers but will fit in 51 bits makes a lot of sense. People take long integer types for granted these days, but they weren't always available. Using a single number to represent a time stamp is a lot more convenient than having to work with separate upper and lower portions.

1

u/Langdon_St_Ives Dec 09 '25

A lack of robust integer types is a major design flaw whichever way you look at it.

1

u/flatfinger Dec 10 '25

Double-precision floating-point format can precisely represent all values of a 32-bit integer, and Javascript bitwise operators work just as they would on 32-bit integers. Javascript does support array-of-integer types, and for most tasks the performance downsides of using floating-point are small enough not to matter.

Unless a language is going to support separate integer- and floating-point division operators, having only one kind of non-array number is a cleaner design than having multiple types.