eli5: How did we solve the Y2K bug?

337 views

I understand what the general issue was for y2k. Computer systems that only recorded the last two digits of the year would reset to 01 Jan 1900 and cause issues for banks and other important records. My question is how did people fix the problem and test computers to make sure they were good? Was it a lot of manually typing in shell commands or could IT folks implement a patch with a floppy disk or some other removable media? How do you get a computer that was built to work with a certain date format to recognize dates in a new format?

In: 4

12 Answers

Anonymous 0 Comments

Y2K was simply not a problem for a lot of systems, but was easy to write news stories about. The year 2038 is the real problem. A lot of computer programs store times as:

“seconds since 1st Jan 1970”

This is a somewhat arbitrary starting point that works well for a lot of tasks since it allows you to store the time in seconds as a 32 bit integer which allows you to perform a lot of fast math on times. Computers don’t understand 21st Feb 2003 minus 4 days seven seconds natively, so your software needs to do a bunch of conversion. They do however understand 1.5 billion minus 2 million and can do that calculation blisteringly fast. With a system like this you only convert the output to something human readable when someone needs to view it, so it’s way more efficient. This system gives you all the dates between early 1901 (-2 billion seconds) to 2038 (+2 billion seconds).

So for many things which used standard 32 bit time, y2k wasn’t really a problem. You might have to fix the human interface input/output part of some programs, but most worked just fine. While potentially a decent amount of work, generally there was a software fix.

However the 2038 issue is potentially a much bigger one. This is the maximum time that a 32 bit epoch time system can hold, and any more seconds cause an overflow error and the time reverts back to 1901. That’s only 16 years away! For most modern electronics, they can use 64 bit time just fine which gives us almost 600 billion years worth of seconds, however there are **tonnes** of embedded microcontrollers in all sorts of systems that can’t move on from 32 bit time. Think avionics in aircraft (the B52 is like 70 years old, 30 year old aircraft are common), the sewage pump under your street, the xray machine at the hospital, your car, radio transmitters, missile control systems, telecommunication equipment, industrial machines in factories, ship navigation systems – the list goes on. This is the real Y2K bug.

You are viewing 1 out of 12 answers, click here to view all answers.