End of Time (Unix) - NumberphileJun 09, 2021
JAMES CLEWETT: The end is near, Brady. Time is coming to an end and I can tell you, in fact, precisely when
timeis going to end. It will end at 3:00 a.m., 3:14.07 on January 19, 2038. What is happening is that we are talking about the end of Unix
time. Now... BRADY HARAN: What is that? JAMES CLEWETT: You're making a face at me like you don't know what I'm talking about, Brady. Most of us at home use Windows or Mac based operating systems for our computers. And somewhere buried deep in that system is a little counter that has been ticking off every second, that's a quick second, every second since January 1, 1970.
They started a counter at a 32-bit number, crucially. , that was just I'm going to count the seconds. And obviously, because it's only a 32-bit number, it will run out at some point. That is the point. This is the moment when that number is running out of seconds to count. This is how your computer tells time. This is how your computer keeps the date. So you can take this number, the number of seconds, and you can divide it and keep dividing it and keep dividing it to get back to the number of minutes, hours, days and years that have passed since January 1, 1970.
So, this is the cool thing about Unix Epoch. Now, the reason I keep talking about Unix is because back then there was an operating system called Unix, which was just beginning to gain a foothold in corporations and mission-critical systems. The point is, on each of those mission-critical machines, there are a number running, counting down the seconds, and it's approaching January 19, 2038, when it will run out. And when that happens, something very strange will happen. It's going to go back to... I think it's December 1901. So in a way it's cool, because it's a chance for us to remake the 20th century and maybe get it right this time.
But in other ways, it's going to be absolutely catastrophic, because it looks a lot like the Millennium Bug, so some of its viewers were too young to remember the Millennium Bug. But for those of us who were there, the Millennium bug was a problem when we stored the date as a two-digit number on many computers, mainly in the '80s. And everyone thought, that's too far away. We're not going to have to worry about what happens when we get to the year 2000. But it turns out that once you have a working computer, let's say if you're in a bank or if you run an airline. , you have a system that works.
It costs too much to bother changing that, so things keep working for years and years and years. And the year 2000 came and all these computers were going to fail in some obscure way. So a lot of times the date started showing up as 19,100, or if it was a system that relied on incremental date, like if you were adding interest to your bank account, then all of a sudden it would go from 99 to 0. And it would add a huge amount of negative interest to your bank account, which is good if you have a mortgage and terrible if you have savings.
I worked on this for a few years leading up to the millennium, and we went through and repaired all the machines that were too old to survive the millennium. And, of course, everyone knows that it wasn't a problem in the end. Well, there were a few cases, some sad and some quite funny, where it went wrong, but for the most part it wasn't a problem. So, we have to go back to the Pac-Man video we made where we were talking about binary numbers. And in Pac-Man, we stored that binary number as an 8-bit binary value, and that meant it could count up to a maximum of 256.
Now, it's a choice. It's a high of 256 and a low of 0, or a low of minus 128 and a high of 127. So this value has gone from a low of minus 2 billion to a high of plus 2 billion, and this is the moment when it reaches that maximum value of 2,000 million. Well, actually it's not 2 billion. There are about 2,150,000,000. But it's a big number. BRADY HARAN: When I turn off my computer at home and it has no power, obviously it doesn't count anymore, right? JAMES CLEWETT: It doesn't count anymore, but there's a battery inside that stores its current state.
It depends on how your computer is configured. Some computers are configured to immediately connect to the server and get the current time just to make sure all those computers are synchronized on the network. Other computers, like your home computer, are configured only to read the date or time from a memory chip, which has been stored with a CMOS battery. What we are going to have to do, very simple: the same old solution with these things: we have to throw away the machines that have two small numbers and replace them with a larger version. And that is already starting to happen.
We are already moving from 32-bit computers, which count in 32-bit numbers, to 64-bit computers, which count in 64-bit numbers. And with a 64-bit counter, this problem is greatly eliminated, and actually that number is somewhere far beyond the end of the known universe. Far beyond the heat death of the universe. BRADY HARAN: Do you think it's going to be a date where everyone will be worried? Do you think there will be panic seasons when this time comes? JAMES CLEWETT: Yes. I think there will be a problem. Because I remember being in a bank in 1999, quite a long time ago, and looking at the oldest computer I had ever seen in my life, and someone said, oh, that's just our payment system.
And it just worked. They used that word...just...and no one had ever thought about it. And I had to look at that machine and say, well, you know what? Your payment system will not work next week. We need to fix that. And I don't doubt for a second that there will be 32-bit computers in the corner of some dusty building of a bank, corporation, airline or whatever in 2038, and they are just going to go wrong. And all those bookings for your Malaga holiday will be erased in some horrible way. So I don't think it's going to go wrong in any life-threatening way, but yes, there will be some comical mistakes.
And certainly, for people like me who know how to solve this problem, there's a huge opportunity to... well, we're talking about my pension. I'm upgrading from 32-bit computers to 64-bit computers to pay for the last 30 years of my life. I'm already looking forward to it. You can review and select key dates in Unix numbers. On September 9, 2001, one billion was reached and many people celebrated. There was a small celebration in Norway for 1,111,111,111. And that's why people are noticing that Unix's time is passing. But for most of us, this happens behind our backs. So what we have here is the current Unix time at 1.34 billion.
So if you're feeling really smart at home, other than the fact that the date is in the top corner of the screen, you could tell when we're filming this. Because this is the number that the computer uses to calculate this date. It's like watching your life go by.
If you have any copyright issue, please Contact