The Year 2038 Problem - What Will Happen to Computers? (film, 8 minutes)
The channel 0xLOUISDEV presents a significant issue that awaits us in the future, known as the year 2038 problem. This event will occur on January 19, 2038, precisely at 3:14:07 AM. The problem arises from a long-established method of storing and handling time in software code. In the presentation, a simple program running on a Linux server is shown, which outputs the current system time every second. When the system time is set to a few seconds before this mysterious moment, the program freezes, and upon restarting, the system date is set to December 1901. Such a drastic change requires explanation, and understanding this phenomenon hinges on how computers count time.
Computers count time by storing the number of seconds that have passed since January 1, 1970, also known as Unix timestamp. In most cases, this timestamp is saved as a signed 32-bit integer, meaning it has a fixed size of 32 bits. The maximum value this timestamp can hold, divided by 2 minus 1, leads to the date of January 19, 2038. When the variable that increments every second reaches its maximum value, it wraps around to its minimum value, resulting in a reset of the system date to 1901. This is what happened with the program presented, which froze due to the reset.
The video also anticipates that these issues are not limited to computers. Old equipment that cannot be updated remotely is still widely deployed. This poses serious implications for our society's technical infrastructure, impacting public transportation, medical devices, and financial systems. As noted, issues may even arise in modern cars, where the software may not always be updated remotely. Not every manufacturer has the flexibility to adapt their systems. This situation emphasizes how small oversights in technology development can lead to far-reaching consequences.
The film emphasizes the importance of future-proofing and maintaining the technologies we rely on today. With advancements in artificial intelligence and technology at an all-time high, it becomes crucial to ensure that the standards set now will have a long-term positive impact. Each of us should consider how our current technological choices may influence future generations. Notably, the year 2038 is approaching faster than one might expect; we are closer to 2038 than to the year 2000.
Lastly, it’s worth mentioning the statistics around this video. At the time of writing this article, the video had 3,890 views and 142 likes. The channel 0xLOUISDEV encourages viewers to stay updated on important technological themes and their future implications.
Toggle timeline summary
-
Introduction to the year 2038 problem and its significance.
-
Details about how electronic devices will be affected.
-
Explanation of the historical context of time handling in software.
-
Demonstration with a Linux server showing a program to output system time.
-
Simulation of the event set for January 19th, 2038.
-
Explanation of how computers track time since January 1st, 1970.
-
Overview of the 32-bit signed integer limitation in storing timestamps.
-
Discussion on integer overflow and its consequences.
-
Understanding system reset to 1901 due to timestamp overflow.
-
Reference to a previous high-profile integer overflow with YouTube.
-
Proposed solution of converting to 64-bit integers to avoid future issues.
-
Discussion on the importance of preparedness and hardware upgrades.
-
Concerns regarding outdated systems and deeply embedded technology.
-
Impact of the problem on car software and manufacturers' awareness.
-
Reflection on technological oversight and its long-term consequences.
-
Encouragement to consider future implications of current technology standards.
-
Conclusion and invitation to view additional content.
Transcription
On January 19th, 2038, at exactly 14 minutes and 7 seconds past 3 a.m., something predictable yet unforeseen will happen in the software of many computers. And the thing is, we don't even know the full scope of that future incident and how bad electronic devices of any kind including for example cars will be affected. It is called the year 2038 problem and the result of a long ago chosen way of storing and handling time in software code. Let me demonstrate it to you with a basic Linux server. I wrote a simple program which will output the current system time every second. But before we execute it, let's set the system time to a few seconds before that mysterious date so we can simulate the event. Look what happens when we hit the 7th second. The program freezes, no response. So I manually restarted and suddenly the system date is set to December 1901. How did that happen? To understand why this happened and why that exact second of that date in 2038 plays such a significant role, we have to understand how time works in computer software. Computers count time by storing how many seconds have passed since January 1st 1970. That exact date is a set standard which every programmer uses. A more precise format which works in that exact same way is to count the milliseconds from that date on, but we will only focus on the seconds. This timestamp will in many cases be saved in the software code as a so-called signed 32-bit integer, which is basically a slot in the computer memory with a fixed size of 32-bit which will be assigned to our code when we need it. We can read and write data from it, in this case a number, the seconds passed since 1970. This unique time format might seem a bit weird at first, but it makes it really easy for programmers to handle time in code. You for example want to measure how long it took to execute a specific part of a code? Just save the current Unix timestamp at the start and subtract it from the timestamp at the finish time. Then you get the seconds passed between those two events. But like I said, this type of variable, which is used to store their timestamp, has a fixed size. The maximum value it can contain is 2 to the power of 32 divided by 2 minus 1, which translates into January 19th, 2038, 3 hours, 14 minutes and 8 seconds UTC time zone. You now might already see the problem here. What happens to a computer when a timestamp variable which increments every second reaches its maximum value? When signed integers reach their limit, they will wrap around to their minimum value. It's basically the computer equivalent of trying to count to 6 on one hand. You just can't. And that is what happens in 2038. This also explains why in our demonstration, our system time was suddenly set to 1901. Our Unix timestamp started counting at 0 and subtracting 2,147,483,647 seconds from January 1st, 1970, our zero reference point, will bring us to exactly that date and time in 1901. In our simulation, the Linux server itself did not crash. It just reset its time accordingly to 1901. But some code can't handle those kind of negative values at all and will just freeze or crash, like my program which printed the system time every second. Another well-known integer overflow incident was caused by the Gangnam Style YouTube video. In 2014, the amount of viewers exceeded the 32-bit integer limit which forced YouTube to change the variable to a 64-bit integer. And that's in general also the most established fix for this problem. The currently used 32-bits can only represent up to 70 years. By updating to 64-bits, we can suddenly store more time than the estimated lifespan of the universe. So as you can see, the solution is technically not even difficult. So what makes that event such a big deal? What can we expect to happen? With enough preparation, the most critical parts of our society's technical infrastructure will be safe. We already made first fixes by upgrading to 64-bit hardware. However, the memory size problem is not restricted to hardware. There also has to be made according changes in the software, too. Any system that can be remotely updated will most likely be fine. The most concerning will be old computers which are still in use at that day and software that is not being maintained anymore. But outdated systems are up to this day still widely deployed more than you might think. We will also have serious issues with deeply embedded systems such as all public transportation and airplane hardware, financial systems, medical devices, digital cameras, digital watches, network routers, and maybe even systems like satellite computers. You see, this problem affects even more devices than you might think. And the list could go on even further. We may end up with a significant amount of cars that could experience serious issues in their embedded software. Of course, car manufacturers are aware of the potential impact Of course, car manufacturers are aware of the potential impact on their vehicles, but not every car can be remotely updated and patched. The consequences could range from minor inconveniences to serious safety issues with the vehicles. The year 2038 problem reminds us that seemingly small oversights when developing and establishing new technologies can have massive and far-reaching consequences that impact our entire infrastructure. Moreover, this problem brings up the question of how we can maintain and sustain our technological infrastructure over time. As our world becomes increasingly reliant on technology, it's important that we think critically about how we can create systems that are resilient and able to adapt to changes over time. Especially in the development peak of AI which we currently experience, we have to keep in mind that deeply embedded technical standards which we set now can and will have a massive impact in the future. We are closer to 2038 than to the year 2000. 2038 is in only 15 years from now. Thanks for watching, I hope you enjoyed this video. If so, you might also be interested in one of those two videos I made.