Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Wednesday January 22 2020, @05:18PM   Printer-friendly
from the here-we-go-again dept.

Steven Bellovin, Professor of Computer Science at Columbia University writes briefly with a concrete example of how the Y2038 threat works.

[...] just as with Y2K, the problems don't start when the magic date hits; rather, they start when a computer first encounters dates after the rollover point, and that can be a lot earlier. In fact, I just had such an experience.

A colleague sent me a file from his Windows machine; looking at the contents, I saw this.

$ unzip -l zipfile.zip
Archive: zipfile.zip
Length Date Time Name
——— ——— ———
2411339 01-01-2103 00:00 Anatomy...
——— ———

Look at that date: it's in the next century! (No, I don't know how that happened.) But when I looked at it after extracting on my [MacOS] computer, the date was well in the past:

$ ls -l Anatomy...
-rw-r-r-@ 1 smb staff 2411339 Nov 24 1966 Anatomy...

Huh?

After a quick bit of coding, I found that the on-disk modification time of the extracted file was 4,197,067,200 seconds since the Epoch. That's larger than the limit! But it's worse than that. I translated the number to hexadecimal (base 16), which computer programmers use as an easy way to display the binary values that computers use internally. It came to FA2A29C0. (Since base 16 needs six more digits than our customary base 10, we use the letters A–F to represent them.) The first "F", in binary, is 1111. And the first of those bits is the so-called sign bit, the bit that tells whether or not the number is negative. The value of FA2A29C0, if treated as a signed, 32-bit number, is -97,900,096, or about 3.1 years before the Epoch. Yup, that corresponds exactly to the November 24, 1966 date my system displayed. (Why should +4,197,067,200 come out to -97,900,096? As I indicated, that's moderately technical, but if you want to learn the gory details, the magic search phrase is "2's complement".)

While attention is paid to desktops and servers, they are easy to replace and have very short lifetimes. In contrast embedded systems should be receiving special action already since they are seldomly or never updated and have lifespans measured in decades.

Previously:
Reducing Year 2038 Problems in curl (2018)
The Time Is... 1500000000 (2017)


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 3, Insightful) by maxwell demon on Thursday January 23 2020, @02:14PM

    by maxwell demon (1608) on Thursday January 23 2020, @02:14PM (#947386) Journal

    Are you sure? You might need to visit the hospital. Lots of computerized machines there. Or maybe you'll have a medical implant (like a pacemaker) that contains a small embedded system.

    You almost certainly will need to have money. And you most likely will have most of it on a bank account. Managed by computers. You also might want to use your credit card. Where all transactions go through computers. And even if you only use cash stored at home (assuming that will still be possible), what do you think controls all those cash tills? Right, computers.

    You might still want to drive around in a car. All cars will be controlled by computers, even if not self-driving. Indeed, cars built today are full of computers, so even if you just keep a current car, you may be affected as well.

    Depending on where you live, you will want to have heating in the winter. Which most likely will be controlled by a computer.

    When did you buy your microwave oven? Unless it's pretty old, it almost certainly has a computer inside.

    Oh, and what do you think controls that power plant you get your electricity from?

    --
    The Tao of math: The numbers you can count are not the real numbers.
    Starting Score:    1  point
    Moderation   +1  
       Insightful=1, Total=1
    Extra 'Insightful' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3