Unix 2038 Problem: A Y2K Bug on Unix for the Year 2038
Written by Pavan Kumar on July 8, 2009
9 years back was the year 2000 which marked a significant date in the computer industry. Those days raised the heat of Y2K – Year 2000 or Millennium bug with all computing systems. If you remember those days, it was supposed to make a huge negative impact if it were not corrected at right time. The bug was fixed properly which saved the computer industry from great failure.
A similar problem may occur on all Unix based systems on 19th of January, 2038 if they are not upgraded from 32 bit to 64 bit. Here is a note about what happened in 2000 (Y2K) and what will happen in year 2038.
What is Y2K ? Why was it caused?
Computers during initial days were made to "think" in two digits for year while counting dates. They were done with intent of keeping the first 19 as constant and changing the last two digits like in 1998, 1999 etc. This was supposed to cause a major problem of resetting everything on some programmed computers as a result of overflow of date from 1999 to 1900. Anyway major nations took it seriously and developers succeeded to fix the problem which resulted in reducing losses on a major part.
What is Year 2038 Problem?
Now, its time for Unix for a Millenium Bug, it is also called as Unix Millenium Bug. This is caused due to the Unix time is computed on a binary format and the counting will be valid from 1970 to 2038. On January 19th 2038 at 03:14:37 this resetting will take place and lead the Unix systems to count the date from 1970. This can be fixed by Unix vendors when they switch from 32 bit to 64 bit versions. Thought it is a long time ahead, it could cause a problem for programs which work for very future dates.
Here is how the date gets reset on year 2038.
Note that the image contains an error that the counting will reset to 1901 which is not the same as in the explanation. One more confusion is the time region that wikipedia says as UTC. Do you think the time zone would matter for any system to reset? I think its that time in any region the computer is set for.
Also read: Run Windows Software on Linux
Image credits and more info: Wikipedia
People who liked this also read:
Actually, the image is correct…your explanation is flawed. When the 32 bit signed int rolls to 100…000, it becomes negative, thus it will be ~68 years before 1970.