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?

146 Upvotes

138 comments sorted by

View all comments

Show parent comment

2

u/flatfinger Dec 09 '25

I wonder why they chose Jan 1, 1970 rather than something like March 1, 1968? Using March 1 as an epoch date means that one can start by dividing the day number by 1461 (computing both quotient and remainder). Another similar but more puzzling choice was the Apple classic Macintosh, which uses unsigned dates, but chose January 1, 1904 as its epoch date.

2

u/ghjm MSCS, CS Pro (20+) Dec 09 '25

By all accounts it was an arbitrary choice by the early Unix team. Can you explain what you mean about dividing by 1461?

2

u/flatfinger Dec 09 '25

Every group of 4 years has 1461 days, at least until 2099.

1

u/Langdon_St_Ives Dec 09 '25

What does this buy the cpu?

2

u/flatfinger Dec 09 '25

If one uses March 1 as the epoch, leap day will be the last day out of each group of 1461 days.

2

u/Langdon_St_Ives Dec 09 '25

Still fail to see what this buys us. It’s already trivial to work out leap days during the limited time range you specify, and only marginally less trivial beyond that.

2

u/flatfinger Dec 09 '25

It's not terribly hard either way, but the code ends up being a little simpler, and January 1 isn't really any less arbitrary than March 1. What's weird is that the new year was changed from March 21 to January 1 rather than March 1 (note that what we now call the ninth through twelfth months are named as the seventh through tenth months).