The Year 2038 Problem

What is the Year 2038 problem and who will be impacted?

The Year 2038 problem, also known as Y2K38 or Epochalypse, is a computer bug that will affect the systems that make use of a 32-bit Integer system for storing the date and time information. The consequences will be felt mostly in offline (internet-unconnected) devices.

Picture of digital clock malfunctioning and showing random digits - 2038 Problem
Photo by Donna Elliot on Unsplash

What’s the Problem?

The problem here is with the way UNIX machines store and process the time and date information. UNIX system made use of a library of routines called the standard time library. The time values are stored in this library using a common 4-byte format.

The conventional 4-byte format takes the assumption that time began on January 1, 1970, at 12:00:00 a.m. This number is zero. The number of seconds after that zero value is used to indicate any time or date value. The number 919642718 thus refers to the time 919,642,718 seconds after midnight on January 1, 1970, which is Sunday, February 21, 1999.

Now the maximum value that a 4-byte Integer can store is 2,147,483,647 which translates to January 19, 2038. Once the signed Integer reaches its maximum value, it will roll over to the negative value which is invalid since we are keeping time

Who will be impacted?

Today, almost every piece of machinery has a microprocessor that functions on this system. Embedded systems are used to automate particular activities and communicate with other system components in factory machinery and transportation systems, such as those found in cars and airplanes. For example, cars use onboard computers to monitor electronic stability control, traction control, GPS system, braking systems, etc. When the UNIX epoch ends, these machines could malfunction and crash

First Identification

Reports of an early occurrence of the Y2038 bug in the AOLserver software arose in May 2006. A workaround was built within the software to accommodate a database call that “never” should have timed out. The initial design just supplied a random time-out date in the future rather than properly handling this unusual scenario.

The request was set to time out after one billion seconds in the server’s default setup. The cutoff time of 2038 is one billion seconds (just over 31 years, 251 days, 1 hour, 46 minutes, and 40 seconds) after 01:27:28 UTC on May 13, 2006. This led to the time-out computation overflowing and returning a date that was actually in the past after this point, which caused the software to crash. AOLserver administrators had to change the configuration file and reduce the time-out when the issue was identified.

Possible Solutions

Most computing devices should be alright because this problem can be fixed for those connected to the internet with a quick software update.

As 64-bit computers are employed in the new electronics being released today, 32-bit computing systems are already being replaced by better computing systems. They have considerably more time—far more time than the lifetime of the universe itself—to solve this issue! These clocks will be accurate for 292 billion years, or 20 times the age of the universe as it is right now.

The devices that can’t be updated by a software patch and aren’t connected to the internet will pose the biggest problems. These are probably going to malfunction and cause a bit of havoc. But apart from that everything will be perfectly manageable–so don’t worry!

If you liked the article, don’t forget to leave a comment below

References:

https://en.wikipedia.org/wiki/Year_2038_problem

https://computer.howstuffworks.com/c.htm

Leave a comment