13

Starting with the epoch time

1 January 1970 00:00:00

and counting to the limit a 32-bit signed integer can reach, the day when we reach the limit of counting time (in computer, of course) is 2038-1-19, as given in the answer by Matt Howells.

a 32-bit signed integer using 1970-1-1 as its epoch can represent dates up to 2038-1-19, on which date it will wrap around to 1901-12-13

If it wraps around to a back date, what then is the solution to count the time forward instead of wrapping to back date? As given in wikipedia

There is no universal solution for the Year 2038 problem.

I don't feel comfortable about this! There must be some thought as to the solution to this problem. I understand the cause for not using a 64-bit integer in the first place (which would give us 292 billion years to relax!): not many machines could (could any?) handle 64-bit integers that time. And switching to a 64-bit integer now has its own problems. What then could be the solution to this?

Community
  • 1
  • 1
Sнаđошƒаӽ
  • 16,753
  • 12
  • 73
  • 90
  • 5
    "And switching to a 64-bit integer now has its own problems." Well, an awful lot of platforms did that a long time ago, usually using a millisecond resolution instead of seconds. Basically, anything still using "seconds since the Unix epoch" is going to *have* to change... – Jon Skeet Mar 21 '15 at 09:25
  • 1
    WOW, the legendary @JonSkeet commenting on my question! Let me see what good deed did I do today! – Sнаđошƒаӽ Mar 21 '15 at 09:29
  • 5
    For Knuth's sake keep this issue under your hat until late 2037. The day rates for programmers fixing the Y2.038K problem will be astronomical ! – High Performance Mark Mar 21 '15 at 09:39
  • That will be when the machines rise up, un-fettered by our timestamps! – Mike Jun 04 '16 at 22:58
  • Well java (like many other languages) are [good for another 290 million years](https://stackoverflow.com/questions/4195027/when-will-the-java-date-collapse). – Bohemian Oct 11 '17 at 16:38

0 Answers0