Slashdot Mirror


You've Got 25 Years Until UNIX Time Overflows

CowboyRobot writes "In 25 years, an odd thing will happen to some of the no doubt very large number of computing devices in our world: an old, well-known and well-understood bug will cause their calculation of time to fail. The problem springs from the use of a 32-bit signed integer to store a time value, as a number of seconds since 00:00:00 UTC on Thursday, 1 January 1970, a practice begun in early UNIX systems with the standard C library data structure time_t. On January 19, 2038, at 03:14:08 UTC that integer will overflow. It's not difficult to come up with cases where the problem could be real today. Imagine a mortgage amortization program projecting payments out into the future for a 30-year mortgage. Or imagine those phony programs politicians use to project government expenditures, or demographic software, and so on. It's too early for panic, but those of us in the early parts of their careers will be the ones who have to deal with the problem."

84 of 492 comments (clear)

  1. Could we be a little less biased? by damn_registrars · · Score: 5, Insightful

    those phony programs politicians use to project government expenditures

    The programs are real, even if the math may be phony.

    --
    Damn_registrars has no butt-hole. Damn_registrars has no use for a butt-hole.
    1. Re:Could we be a little less biased? by Anonymous Coward · · Score: 5, Insightful

      History shows us that it's not biased in the slightest to assume that politicians will lie, cheat, and steal their way to riches. Giving them the benefit of the doubt is like Charlie Brown giving that field goal one more shot because maybe, just maybe, Lucy won't pull the ball this time.

    2. Re:Could we be a little less biased? by Archangel+Michael · · Score: 2

      Most Insightful Post Ever!

      --
      Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
    3. Re:Could we be a little less biased? by Anonymous Coward · · Score: 2, Funny

      History shows us that

      Blah blah blah. The parent was not giving anyone the benefit of the doubt. And just FYI the whole football thing was an analogy for sex.

      As for the article, I'll sum it up for everyone: "Y2K is coming to get youuuuuuuuuuuuuuuuuu!!!! Hide the children!"

    4. Re:Could we be a little less biased? by tlhIngan · · Score: 5, Informative

      Actually, banks, and such already ran into Y2K problems in the 70s when long term loans starting overflowing them. For them the Y2K scenario had many years to be fixed slowly (mostly a continuous updating thing - as things broke, they fixed it) so there was no big rush for them as they were experienced in such issues.

      If there are any 2038 issues, the banks have already been ahead of the curve and seeing them in 2008. Hell, a good conspiracy theory....

      time_t has also been 64 bit for a number of years now (you don't need a 64-bit system to deal with 64-bit numbers - it's just dealing with them is a lot slower as the compiler emits library calls to perform the arithmetic). So it's not a real problem even on embedded systems (ARM only added 64-bit support in the ARMv8 instruction set - and only in the high-end A (applications) profile processors - the lower end R (real-time) and M (microcontroller) profiles are still ARMv7 only).

      However, even those compiled with 64-bit time_t aren't necessarily safe - you'd probably find most of them assume it's still a 32-bit quantity and end up storing it as such - ignoring the compiler warnings or casting to get rid of them. So even programs of today with 64-bit time_t's won't necessarily make it past 2038 either.

      And if stuff like that is done, recompiling does diddly - the bug will still strike despite a 64-bit everything. Hell, someone may have decided during the conversio nto increase the timestamp size from 32 to 64 bit, but didn't realize someone squashed it down to 32-bit upstream.

    5. Re:Could we be a little less biased? by Anonymous Coward · · Score: 2, Insightful

      those phony programs politicians use to project government expenditures

      The programs are real, even if the math may be phony.

      The math is real, even if the inputs are phony.

    6. Re:Could we be a little less biased? by Anonymous Coward · · Score: 4, Funny

      ...And just FYI the whole football thing was an analogy for sex....

      And anyway, Peter Griffin took care of that football thing once and for all.

    7. Re:Could we be a little less biased? by i_ate_god · · Score: 3, Insightful

      You would think that if all politicians cared about was their own greed, they'd be far better off than they are now no?

      --
      I'm god, but it's a bit of a drag really...
    8. Re:Could we be a little less biased? by interval1066 · · Score: 3, Insightful

      you don't need a 64-bit system to deal with 64-bit numbers - it's just dealing with them is a lot slower as the compiler emits library calls to perform the arithmetic...

      A lot slower? Nah. Negligble, at best. It'll be fine.

      --
      Python: 'And then suddenly you have a language which says "we're all stuck with whatever the whiniest coder wants".'
    9. Re:Could we be a little less biased? by jnork · · Score: 4, Insightful

      If you're doing so many 64-bit calculations that it's seriously impacting the performance of your 32-bit machine, then either you don't care or you need to upgrade to a 64-bit machine.

      I'm sure you can come up with a scenario where that's not possible, but I see no reason to solve that problem until and unless it comes up. Meantime, I do all my work on 8-bit processors and laugh at your 64-bit woes (somewhat hysterically).

      --
      Cleverly disguised as a responsible adult.
    10. Re:Could we be a little less biased? by AlecC · · Score: 2

      Even if you are doing millions of time operations, the only meaningful operations I can think of on absolute times, as opposed to intervals, is addition or subtraction of an interval to a time, and subtraction of one time from another to create an interval. Both of these operations are negligibly slower on a current 32-bit machine, which will probably be much more bound by the extra memory bandwidth needed to fetch the larger structures. 64-bit multiplies and divides give 32-bit machines indigestion. 64-bit adds need two or three fast instructions instead of one. Time calculations don't need the things like matrix multiplies which consume ream mips.

      (Caveat: this may not apply to people building time machines. If you have 2-D or higher time, I can see how it could get complicated).

      --
      Consciousness is an illusion caused by an excess of self consciousness.
    11. Re:Could we be a little less biased? by dkleinsc · · Score: 4, Insightful

      History shows us that it's not biased in the slightest to assume that politicians will lie, cheat, and steal their way to riches.

      What is biased is to assume that the non-elected civil servants who actually do the math will not attempt to do their jobs to the best of their ability. For example, the staff at the Congressional Budget Office who actually do the math do not directly report to any politician. Similarly, the civil service laws exist specifically to prevent someone from, say, being fired by NOAA for coming up with the "wrong" climate data, or fired from the SSA for coming up with the "wrong" Social Security budget projections.

      So you're right to assume that politicians lie, cheat, and steal. But that doesn't mean that a GS-11 actuary working in the bowels of a government agency is lying in his reports.

      --
      I am officially gone from /. Long live http://www.soylentnews.com/
    12. Re:Could we be a little less biased? by Anonymous Coward · · Score: 5, Funny

      For them the Y2K scenario had many years to be fixed slowly (mostly a continuous updating thing - as things broke, they fixed it) so there was no big rush for them

      There's a motorcycle shop in my town where all the receipts are dated "1913". And printed with tractor feed dot-matrix.

      So not everybody's in a big hurry.

    13. Re:Could we be a little less biased? by davester666 · · Score: 2

      Yes, there is the competing force of "Don't let the general population find out you are a money-grubbing dirtbag."

      --
      Sleep your way to a whiter smile...date a dentist!
    14. Re:Could we be a little less biased? by Darinbob · · Score: 4, Interesting

      I've seen some relatively new systems using a 32-bit time, even some using the same API as Unix. It's relatively common in embedded systems. Many of them just go ahead and use signed 32-bit as there's no need to have internal times be compatible with external systems.

      Ultimately I think the problem arises because of overusing time_t. Originally this was something you used to attach a time to a file in a file system, or a time in a log entry, etc. A time system on a file system with a limited range is not a problem. That media is not going to be active 40 years later. The file may last longer but in such cases presumably it's copied to new media with a different method of storing times. So not a problem for file systems to do this. The problem however is that this time system was expanded to be used for more general purpose times. And over time it's practically a de-facto standard to stick with time_t and its 1/1/1970 base date. People don't think about converting from system time into an external time when exporting data, they just assume time_t is valid everywhere. Programmers just use whatever time system they find in the system's libraries without worrying about whether it is an appropriate use or not.

      Many application areas already have to avoid using time_t anyway and are used to converting between one time system to another. Astronomy, geneology, medical records, historical data, etc.

    15. Re:Could we be a little less biased? by InterGuru · · Score: 5, Insightful

      We denigrate politicians because they lie, but candidates who tell the truth do not get elected.

    16. Re:Could we be a little less biased? by dkleinsc · · Score: 2

      And the report they come up with will say something along the lines of "Here are the assumptions that Congressman Blowhard requested we used: ..." They will sometimes also say "Here are the assumptions that Congressman Blowhard requested we used: ... Here's what we think is actually a realistic projection: ..."

      The CBO didn't lie: Their report said exactly what assumptions were made, what the conclusions were going to be if those assumptions were made, and hinted that the assumptions weren't valid. What happened there was that Paul Ryan lied twice: Once to the CBO about reasonable assumptions, and again to the public about what the report meant.

      --
      I am officially gone from /. Long live http://www.soylentnews.com/
    17. Re:Could we be a little less biased? by Nefarious+Wheel · · Score: 2

      Actually, banks, and such already ran into Y2K problems in the 70s when long term loans starting overflowing them. For them the Y2K scenario had many years to be fixed slowly (mostly a continuous updating thing - as things broke, they fixed it) so there was no big rush for them as they were experienced in such issues.

      It's times like this when I really, really miss VMS.

      --
      Do not mock my vision of impractical footwear
    18. Re:Could we be a little less biased? by dbIII · · Score: 2

      Y2K did come and get me as late as 2008, when an idiot at Macrovision changed a copy protection program to use two digit years again, and I had software with permanent licences using data zero to mark that it was permanent. Suddenly it stopped working, stating that our licences expired in 2000 and there was no way back, since the new licence also wouldn't work with the older version of the Macrovision flexnet shit so for two weeks nobody could run the $10k per seat real software. Macrovision would not deal with us directly and apparently was very slow to respond to the vendor of the $10k per seat real software.
      The strangest thing is the entire situation was talking to the support "expert" and telling him it was a Y2K bug. "What's a Y2K bug?" was the response. The "Y2K is coming to get youuuuuuuuuuuuuuuuuu!!!! Hide the children!" hype was missed by at least two guys there should have at least have heard of it.

      For the last couple of leap years we've had weird and dramatic completely avoidable hassles (Zune, then the entire MS Azure grid falling over the next time) that seem to have vastly exceeded anything that happened with Y2K so it's likely some idiots will create problems. It just means we need some sort of quality control to check the actions of idiots before they go live with stupid calendar mistakes.

    19. Re:Could we be a little less biased? by Guy+Harris · · Score: 2

      depends.

      If a system has 32 bit words, but handles 64 bit nubmers (i.e. starting somewhere in the i386-i586 range? of x86), it's negligably slower. If, however, it has to be emulated via the use of 2 32 bit nubmers...

      Then at minimum, you need to perform the op twice. Then there's overflow checking and handling, 2 more ops, one of which is a branch... or if neither is a branch, the branch will be a third op.

      Not in C, there isn't.

      so 4-5 ops instead of one, one of which would be a branch.

      $ cat foo.c
      unsigned long long
      foo(unsigned long long a, unsigned long long b)
      {
      return a + b;
      }

      unsigned int
      bar(unsigned int a, unsigned int b)
      {
      return a + b;
      }
      $ gcc -m32 -S -O2 foo.c
      $ cat foo.s
      .section __TEXT,__text,regular,pure_instructions
      .globl _foo
      .align 4, 0x90
      _foo:
      pushl %ebp
      movl %esp, %ebp
      movl 16(%ebp), %eax
      movl 20(%ebp), %edx
      addl 8(%ebp), %eax
      adcl 12(%ebp), %edx
      popl %ebp
      ret

      .globl _bar
      .align 4, 0x90
      _bar:
      pushl %ebp
      movl %esp, %ebp
      movl 12(%ebp), %eax
      addl 8(%ebp), %eax
      popl %ebp
      ret

      So more like four instructions instead of 2 ("pushl %ebp; movl %esp, %ebp" is the function prolog, and "popl %ebp; ret" is the function epilog).

    20. Re:Could we be a little less biased? by ByOhTek · · Score: 2

      Have you worked in "the trenches" in those sectors before.

      (1) You may not be able to be fired for those reasons, but most employers can easily find other reasons to fire an employee. So there's still that fear. It doesn't happen /just/ in Corporate America.
      (2) Even if you aren't directly/indirectly reporting to a political figure, they still pull enough strings to make you worry, and they can still exert influence outside of the chain of command.

      It's not a cut and dry situation. There are buffers, but none of them are perfect.

      --
      Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
    21. Re:Could we be a little less biased? by jeremyp · · Score: 2

      I think that depends on your architecture. On my system, time_t is eventually defined as long. This makes it 32 bits if the compiler is compiling for ILP32 and 64 bit if it is compiling for LP64.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
  2. Not NetBSD by Nimey · · Score: 5, Informative

    NetBSD has switched to a 64-bit time_t.

    --
    Hail Eris, full of mischief...

    E pluribus sanguinem
    1. Re:Not NetBSD by Beezlebub33 · · Score: 4, Insightful

      64-bit is taking over already everywhere. In 10-15 years, you will have a hard time finding a 32-bit computer. (Actually, you might have a hard time finding a 'computer' at some point but that's a whole other issue). With the change to 64 bits, more and more OS's will operate on 64-bit time, and this will not be an issue.

      --
      The more people I meet, the better I like my dog.
    2. Re:Not NetBSD by mrjatsun · · Score: 5, Informative

      > Are you trying to say that "64-bit computers" don't have any support for 32 bit integers?

      The issue is if time_t is a 32-bit int or a 64-bit int. Not if a bit-64 CPU supports 32-bit integers.
      time_t is generally defined as a long across OS implementations.

      In the 32-bit ABI (Application Binary Interface) for most (all?) OSes, a long is a 32-bit value.
      In the 64-bit ABI, a long is 64-bits, so the 2038 time issue does not exist for 64-bit apps.

      So if you are running a 64-bit app, you don't have a problem in that app. One solution is to
      not support 32-bit apps anymore. i.e. you don't support the 32-bit ABI in your 64-bit kernel.
      You can do this easily in linux today (e.g. gentoo, 64-bit only support).

      Another solution is to break 32-bit compatibility (or to define a new 32-bit "ABI") which
      changes the definition of time_t (and some other system types) to be a [u]int64 instead
      of a long.

      So, *if* the parent was suggesting don't support 32-bit apps, then they were right ;-)

    3. Re:Not NetBSD by Anonymous Coward · · Score: 2, Informative

      AFAICT, Linux typedefs time_t to long, which will be 32 bits on 32 bit systems and 64 bits on 64 bit systems.
      There shouldn't be too many 32 bit desktops around in 25 years, but I can easily imagine some long forgotten embedded systems starting to act funky.

    4. Re:Not NetBSD by petermgreen · · Score: 4, Informative

      The problem is not so much the OS, as you say most systems will be running 64-bit operating systems and even 32-bit operating systems will likely find a soloution (like was done for large file support). The problem is the applications which have the assumption of 32-bit unix time built in.

      You might say "just recompile for 64-bit" but that assumes that

      1: you have the source
      2: the source is not full of assumptions that make rebuilding for 64-bit impractical
      3: the source actually stores the time in variables of type time_t or long and not variables of type int or type int32_t.
      4: the data files the program stores on-disk do not include timestamps in unix format in fixed size fields.

      For what proportion of applications do you belive all four of those assmptions will hold.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    5. Re:Not NetBSD by dingen · · Score: 5, Insightful

      The problem is not so much in computers still being 32 bits in 25 years time, but 32 bit computers right now doing calculations involving dates 25 years in the future.

      --
      Pretty good is actually pretty bad.
    6. Re:Not NetBSD by Zordak · · Score: 5, Funny

      In the 64-bit ABI, a long is 64-bits, so the 2038 time issue does not exist for 64-bit apps.

      Perhaps not, but that Y292e9 bug is going to cause some serious headaches for the Pang-Galactic Empire.

      --

      Today's Sesame Street was brought to you by the number e.
    7. Re:Not NetBSD by lordholm · · Score: 5, Interesting

      The main problem is actually not that the time_t in the OS is 32 or 64, hardware and operating systems are upgraded. And, very few systems shipping today will have 32 bit time_t. This will not be the main problem (even if it will be a problem with some systems, for example, some nuclear reactors are managed by custom unices that are not maintained anymore and they don't dare to touch those systems, but this is solvable in the few cases where this is a problem)!

      The BIG problem for more mainstream software is all the software using binary file formats, such software will completely break down, if time is stored as a 32 bit UNIX time stamp. There may also be problem for text based file formats if for example the reading code uses %d with sscanf to read in the timestamp, but if these are compiled with a modern compiler, the compiler will warn that %d is being used with a 64 bit time_t integer. It is thus solvable, but will require recompiling the software and some minor patching. Binary file-formats will however be a pain in the ass, so bad that software systems will probably have to be certified as Y2038-safe.

      Do not underestimate the size of this undertaking.

      --
      "Civis Europaeus sum!"
    8. Re:Not NetBSD by Z00L00K · · Score: 3, Insightful

      If we even are alive by then.

      --
      If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
    9. Re:Not NetBSD by davydagger · · Score: 2, Insightful

      "That's not how it works, you dumb shit"
      actually, that is how you works you dumb shit.
      https://en.wikipedia.org/wiki/Unix_time#Representing_the_number

      read, and get edumicated before you post!

      " time_t has been widened to 64 bits. In the negative direction, this goes back more than twenty times the age of the universe and in the positive direction for approximately 293 billion years."

      So, given that all modern hardware is 64 bit, just about all modern OSs have the option of the same. So you run 64bit OS on 64 bit hardware, and problem solved. 64bit has been the standard for the last 5 years. Linux has had 64bit support since 2005, and for the past 3, 64 bit has been the recommended install.

      TODAY 32 bit UNIX systems are legacy. both in hardware and software. There are 64 bit drop in solutions for just about everything. The way TIME works in UNIX, a simple recompile against 64 bit libraries with a 64 bit system clock will fix the program.

      I cannot see a computer system made today(guarunteed to be 64 bit), being in use in 25 years.

      1. Cars will be 5 years past QQ plates, rebuiling all new custom aftermarket electronics from scratch will be an option for collectors. No one else is going to care.

      2. Airplanes generally retire after around 10 years. There is no reason to expect 25 year old airplanes sitll flying, without of course many many many major overhauls, to include electronics.

      3. IBM only supports mainframes for around ~10 years. Oh mainframes were 64 bit before anything else. UNAFFECTED.
      http://www-03.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/TD105503

      4. the useful life of a desktop computer is around 5-7 years. it might get a secondary life used for "projects" that don't require modern CPU power, giving it a secondary life of another 7-10 years, as legacy, doing basic tasks.

      This is any machine you'd likely do accounting, business, or any sort of complicated financial transactions that sits on a desk, or in a server room. Please note, mainframes and most mini computers went 64 bit in the 1990s. x86 and ARM are the last to do so.

      After 15-20 years, they have passed the threshold of "legacy" into "obsolete", and "unsupported". 20 years ago, was 1993
      https://en.wikipedia.org/wiki/P6_%28microarchitecture%29

      before the P6.

      Now lets look even further 25 years ago: 1988
      http://www.computerhope.com/jargon/num/80386.htm

      the 386. Just recently retired from mainline linux kernel support.

    10. Re:Not NetBSD by amorsen · · Score: 2

      In the 64-bit ABI, a long is 64-bits

      Not true for Windows. On Windows you need a long long to get the native integer size on 64-bit processors. A pointer on Windows 64-bit does not fit in a long.

      On the bright side, Windows does not use the "offset from 1970" method of storing time. Whether the Windows method is better is debatable, but it certainly has no Y2k38 problem.

      --
      Finally! A year of moderation! Ready for 2019?
    11. Re:Not NetBSD by Anonymous Coward · · Score: 2, Funny

      No worries, just serve me a Pang-Galactic Gargle Blaster and I'll get right to work after I recover...

    12. Re:Not NetBSD by Sectoid_Dev · · Score: 5, Interesting

      Except that it wont happen for 25 years... FEAR, UNCERTAINTY, CHANGE... RUN!!!!! THE SKY IS FALLING!! (in 25 years)...

      With the acceleration of development that has been occurring over even the last 10 years, I hardly doubt there will be much to worry about 25 years from now.

      You sound like a manager.
      Leave this on the back burner for the next 24.5 years and then drop everything because then the sky is falling.

      I'm glad this issue got mentioned because frankly I don't ever think about the unix epoch time overflowing. It's a good thing to give programmers a nudge for their current(and future) development
        "Hey use 64 bit time values"
          "Oh yeah, sure,"
          25 years later, no problem.

    13. Re:Not NetBSD by msk · · Score: 2

      One would hope that B-52s are already fixed for the 2038 time_t issue.

    14. Re:Not NetBSD by Gilmoure · · Score: 2

      Yup, the KC-135's (introduced in 1957), I worked on in the 80's, and my father worked on in the 60's. They're still in active service today, with projected use through 2040. But yeah, avionics upgrades out the yin yang.

      As for cars, as long as they allow '68-'72 Chevys on the road, i'll be happy.

      --
      I drank what? -- Socrates
    15. Re:Not NetBSD by N0Man74 · · Score: 2

      I'm sorry, but I'm just not sure how this got modded insightful... This post, like many others, seems to completely ignore the fact that data is stored.

      TODAY 32 bit UNIX systems are legacy. both in hardware and software. There are 64 bit drop in solutions for just about everything. The way TIME works in UNIX, a simple recompile against 64 bit libraries with a 64 bit system clock will fix the program.

      It isn't simply a recompile. You still have to deal with your data, however it is stored. It might be a relatively simple migration, or it might involve data on tapes or other historical data archives, or interoperating with other devices/systems that aren't 64-bit and can't simply recompile (such as embedded systems), or it still might communicate with other computers using protocols that have not yet been updated, etc.

      There are other factors to consider here beyond simply recompiling it with a 64-bit compiler, especially dealing with existing stored data.

      2. Airplanes generally retire after around 10 years. There is no reason to expect 25 year old airplanes sitll flying, without of course many many many major overhauls, to include electronics.

      Paper documents and records are still sometimes referenced for decades, or even more than a century. The usefulness of data can outlive the systems that they reside on.

      Please note, mainframes and most mini computers went 64 bit in the 1990s. x86 and ARM are the last to do so.

      Many mainframes still work with data that is very old, and just because the systems supported 64-bit does not mean that they instantly changed all of their data. I worked in a mainframe environment about 10 years ago that still worked with data stored on tape drives which originally was entered by punch-cards in the 70's, and that still ran programs that hadn't been modified in 15 to 20 years before I touched them.

    16. Re:Not NetBSD by westlake · · Score: 2

      If we even are alive by then.

      Clever. So very, very clever,

      But that is not the way a civil engineer thinks. It is not the way an accountant thinks.

      If you are ready to retire to your Cold War era bunker in the backwoods of Idaho, fine. If you are looking for gainful employment in the production and maintenance of mission-critical systems, look elsewhere, because we don't need you, don't want you,

    17. Re:Not NetBSD by iluvcapra · · Score: 2

      Kidding aside, we can note that *nixes do have a reasonable excuse, since they grew from a Ritchie/Kernighan hobby project originally intended as therapeutic relief from working on MULTICS. Unix wasn't designed for long-term success, and it was designed to be hacked as necessary, so this wasn't a case of egregiously stupid design decisions.

      At the time K&R wrote it, people didn't use "operating systems" as "platforms" for "applications" as much as they were just the first tape you loaded onto the core in order to boot your one-off payroll application, developed by a hundred contractors at stupendous expense. New computer systems would come out every couple years and ship with completely new OSs -- computer infrastructures that could actually run the same client software on different machines (or even different model numbers of the same machine) were specialist and generally exceptions to the rule until the 70s.

      People would keep the OS that shipped with their machine for years and when the time came to buy a new computer, they took for granted that they'd have to significantly rewrite everything and the old computer would have to be kept for several years in order to read the old tapes for audit purposes. The idea that two computer systems, even from the same vendor, would naturally be able to read the same set of tapes or disks was a fantasy, unless you were paying top-dollar for IBM gear.

      When people worried about how to store a date in 1970, they were primarily concerned with how many columns of the card they were taking up.

      It went without saying that they'd never "warehouse" data for longer than the legal requirement, and in any case the paper printouts of every transaction, boxed and shipped to archives every week, were the actual record that anyone would care about. Nobody searched historical computer records, and nobody expected records from more than 12 months back to be online. The online record held a two-digit year because that's all that needed to be printed on the check, the computer's tapes weren't designed to actually serve as a legal record of anything, most people used their machines as fancy check and bill printers that did some totals for them. The paper these machines emitted was the document. In the 80s this mentality changed completely and the computer record became the document, the paper output merely copies, and that's when people started paying attention -- but the attitude people had toward online record-keeping only changed because vendors made it possible to store records on a medium, go through three buying cycles of computers, and have that medium still be readable.

      --
      Don't blame me, I voted for Baltar.
    18. Re:Not NetBSD by Darby · · Score: 2

      Great - you've fixed it at the OS level and now you're saving a 64-bit integer into a DB-table that is expecting a 32-bit integer. Your app still explodes.

      Not necessarily. MySQL will insert it truncated and return a warning. If you don't check warnings then your app will likely exhibit increasingly erratic behavior for however long it takes you to track down the problem which might not even come to your attention until long after you've made the change.

      I much prefer explosions when changes break things.

  3. That's OK by Big+Hairy+Ian · · Score: 5, Funny

    The IOS reminder service will fail for the first week in January atleast once before then :)

    --

    Build a Man a Fire, and He'll Be Warm for a Day. Set a Man on Fire, and He'll Be Warm for the Rest of His Life.

  4. I feel like the security guard in Austin Powers... by killfixx · · Score: 5, Funny

    Standing before the steam roller....

    "Stoooooooooooooooooooooooooooooooooooooooooooop".... .... "Stooooooooooooooooooooooooooooooooop"....

    I understand, we need time to correct the issue, but...c'mon?!

    Slow news day?

    --
    "Helping to keep you two steps ahead of the Thought Police!"
  5. Unsigned! by aglider · · Score: 3, Interesting

    32bit unsigned, not signed! What'd be the negative timestamps for? Ages before 1970?

    --
    Sent as ripples into the electromagnetic field. No single photon has been harmed in the process.
    1. Re:Unsigned! by davydagger · · Score: 2

      "32bit unsigned, not signed!"
      no you heard correct.

      "What'd be the negative timestamps for? Ages before 1970?"

      but you managed to guess this correctly.

    2. Re:Unsigned! by Waffle+Iron · · Score: 2

      Do the math. If they used a 32-bit unsigned integer, the problem wouldn't happen until the year 2106.

    3. Re:Unsigned! by vlm · · Score: 2

      Also a timestamp, in addition to being referenced to 0 = somesuch date, also can be used with offsets. So add a signed integer "-60" to the timestamp signed integer to get a signed integer representing about a minute ago. Since you'll be spending a lot of time adding signed ints to a timestamp, you may as well make the thing a signed int, rather than having to screw up and debug a zillion crappy bug filled homemade implementations of "uint + int = uint". Most of the bugs are dealing with extreme values and rollovers ... most of them.

      On the bright side, at least they didn't use BCD or floats. floats would have been pretty funny, crontab entries not running because of rounding errors and stuff like that.

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    4. Re:Unsigned! by petermgreen · · Score: 2

      Ages before 1970?

      Some applications need to represent times before 1970 (for example dates of birth*)
      Some applications need to work with time differences.
      Some applications use negative numbers to represent errors.

      Unsigned 32-bit unix time values may be useful as a quick fix in some specific scenarios where a field in a data structure is fixed size, where it is accepted that the code processing that field will need to be updated and where it is known that dates before 1970 will not be needed but attempts to use them as a general soloution are likely to break a lot of existing code.

      * Yes there are a handful of people alive whose date of birth cannot be represented by signed 32-bit unix time but it's a sufficiently rare case that most application developers probablly dont care.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    5. Re:Unsigned! by hierofalcon · · Score: 2

      We made this decision for our C library on our embedded 65816 processor used in industrial controllers. We had no reason to represent times before the controller was installed, so losing the sign wasn't an issue. But we thought that 2038 was within the possible useful life span of the controller. 2106, not so much.

      I realize that many people thought that about hardware produced for the century turnover as well, so everything about the time range is internally documented well, but we didn't have any justification for building the math routines to work with 64-bit ints just for this one function. Unsigned was the simplest solution. No host communicating with the controller could handle 64-bit time stamps or wanted to waste the extra bytes of bandwidth to read 4 zeros either.

  6. Getting old by boristdog · · Score: 2

    I put in my time working on the Y2K fix. I'll be retired in 5 years, so let the kids of today fix this one. Hell, they need jobs.

    1. Re:Getting old by slim · · Score: 2

      Yep. We knew Y2K was coming. We tested stuff. We fixed stuff. We got double-time for being on-call instead of partying like it's 1999. And because of all of that, it went smoothly.

      The same thing will happen here. All it needs is for management to put people on the tasks.

  7. Mortgage Calculations by bill_mcgonigle · · Score: 5, Insightful

    Was this a USENET post from '94? Mortgage systems using 32-bit time_t (if there ever were any) failed 5 years ago for 30-year mortgages. We did not hear an earth-shattering kaboom.

    --
    My God, it's Full of Source!
    OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
    1. Re:Mortgage Calculations by Anonymous Coward · · Score: 5, Funny

      Actually we did, but it had nothing to do with integer overflow.

    2. Re:Mortgage Calculations by Thud457 · · Score: 3, Funny

      Mortgage systems using 32-bit time_t (if there ever were any) failed 5 years ago for 30-year mortgages.

      Oh, that was what that was. Oh crap.
      And here all along I've been blaming greedy mortgage brokers for suckering people into mortgages they couldn't afford and a insanely inflated real estate market.

      --

      the preceding comment is my own and in no way reflects the opinion of the Joint Chiefs of Staff

  8. Re:64-bit computers DO NOT solve this problem by JcMorin · · Score: 4, Insightful

    Having a 64-bit will not solve this at all. The problem lie in the software, if a 32-bit time structure as been used, no matter on what computer it's running it will be emulated as a 32-bit application with only 32-bit of memory for time allocation. It will bust, I can see a whole bunch of old program still running because "it work" and company, especially big companies, do not re-write the software in 64 bit.

  9. Re:Is it a real problem? by kenny603 · · Score: 4, Insightful

    In terms of personal computers this isn't going to mean much probably by the time it happens. The problem is that there are many, many embedded devices out in the field that are still running with 32-bit time_t vars. Example from a previous job of mine: we made building automation controllers. Those are all devices that are still out in the field and they are all still running old code. Assuming the devices don't die before the time rollover or are not replaced with newer pieces of hardware then it might become a problem.

  10. Re:64-bit computers DO NOT solve this problem by h4rr4r · · Score: 4, Insightful

    64bit time will solve it for anything that uses time from the system directly. Meaning all those perl and bash scripts that run so much stuff no one thinks about, from billing to transferring data between companies to scheduling your next vacation are going to be fine.

    What will not be fine is crusty old compiled code that was 32bit. Hopefully they are just a recompile away from being fixed. Sadly that is likely not to be the case as generally corporations do not have that kind of foresight.

  11. Noooooooo! by lxs · · Score: 5, Funny

    My uptime!

  12. Surely we'll all be using 64bit by then. by Arancaytar · · Score: 2, Funny

    After all, we handily averted Y2K with decades to spare, and the internet has been migrated to IPv6 for the past ten years. :-P

  13. Time overflowing by Dyinobal · · Score: 3, Funny

    Time overflowing sounds like a good plot, instead of the usual time repeating, or other cliche time related plots. I'm just curious what the effects of a time overflow would be. *ponders* Maybe a break down in causality?

  14. Well by ledow · · Score: 2

    "Imagine a mortgage amortization program projecting payments out into the future for a 30-year mortgage."

    Well, that's a not-unreasonable example that almost certainly exists already, and seeing as we're only 25 years away - seems like the banks didn't really have any problems with that - at least, none they've advertised.

    So the real question is: How big a problem is it really? Application software can trundle off and do what it likes and ignore the clocks it knows are wrong, and 64-bit time systems like are available today are carrying on quite happily.

    Y2K was like this - doomsaying about how your mortgage would fail and your wages would stop. Sure, it could - theoretically - have caused problems. But only if your software managers in charge of those things were complete idiots in the first place (and using an app that was written in the 60's, unchanged, isn't an excuse and STILL makes you an idiot).

    Y2.038K is definitely MORE of a problem. Definitely. But it's obviously not something that those with software that looks that far ahead are worried about at the moment. And in 25 years, in any of my current computers are still operational I will be incredibly impressed. If any of my computers NEXT YEAR aren't running 64-bit OS (whether or not they have 64-bit clocks) I will be slightly put out! So 25 years to move to 64-bit clocks? No problem.

  15. Re:WP article much better by ledow · · Score: 2

    Why can't you do that with an airliner? Maybe a car, but a car that's still running in 25 years is quite an achievement anyway.

    On an airliner? Just basic operational procedure would mean that updates for fixes are common (physical or software) to fix ANY potential problem after YEARS of testing on identical systems deployed in test labs.

    There's almost certainly a copy of a Boeing's internals at Boeing where they've done exactly this (e.g. test Y2K rollover to make sure it doesn't affect flightplan or autopilot) and they didn't risk a plane to do so.

    25 years means none of your current desktops will still be running (it would be like running a ZX Spectrum as a business machine would be seen today). There might be embedded devices, but how many will go 25 years without a SINGLE test or upgrade or fix or replacement? Very, very, very few.

    There isn't a network switch in the world deployed today that will still be around in 25 years untouched. It would literally be like finding out a ZX Spectrum was running vital parts of your business by being tucked away in a cupboard and forgotten about for 25 years and NOT ONE PERSON KNOWING.

  16. Re:64-bit computers DO NOT solve this problem by Hatta · · Score: 2

    If you have a 64 bit PC and OS, it should be little more than a recompile. This is why it's important to have the source.

    --
    Give me Classic Slashdot or give me death!
  17. Re:64-bit computers DO NOT solve this problem by locofungus · · Score: 5, Insightful

    Compiling away isn't always that simple.

    You'd be amazed how many people code depending on the fact that sizeof(long) == sizeof(int) == sizeof(void*) == sizeof(time_t) == 4 even when they don't need to and structures are often mapped directly onto binary data, either from disk or network.

    I don't actually imagine that 2038 will be much of a problem - most of the issues that will be triggered by the above assumptions will occur between now and then and will be fixed as they occur.

    Then 2038 will loom and there will be a big drive to fix everything (else), the magic time will occur and there will be little more than a whimper. Then everyone will complain about the hype about a non-existent problem.

    I am quite looking forward to having the option of some lucrative consulting income in my early retirement should I decide I need it. :-)

    Tim.

    --
    God said, "div D = rho, div B = 0, curl E = -@B/@t, curl H = J + @D/@t," and there was light.
  18. embedded by Anonymous Coward · · Score: 5, Informative

    64-bit is taking over already everywhere. In 10-15 years, you will have a hard time finding a 32-bit computer.

    The embedded world will still have a lot of 32-bit (as well as 16- and 8-bit) stuff for years to come.

    That's where the big problem will be: not with the systems on your desk (or on your lap, or in your pocket), but rather with the hundreds of little CPUs that you don't see (and you may, or may not, be aware of).

    1. Re:embedded by Darinbob · · Score: 2

      Most systems really don't deal with the 64-bit times that much, especially embedded systems. Instead they have their own system time. Even Unix systems don't use Unix time_t internally in the kernel, they need a time domain with a finer granularity. So systems do all their OS work with an internal system time, and only when an application needs to convert to time_t is the 64-bit conversion done and used externally.

      Sometimes the embedded systems wont' do Unix time at all and then it's up to the external application to do the conversion. I hear some programmers act annoyed about this, but I don't see anything wrong with that. After all you are converting from one time domain into another, and someone has to do the conversion. Even if there were a standard time format out there, it may not necessarily be the right domain and you'd need to do the conversion. Even 32-bit time_t and 64-bit time_t are different time domains.

  19. Shhhhh!! by hawguy · · Score: 3, Interesting

    Stop warning people! The Unix 32 bit Epoch cleanup is my retirement plan! I'll make a killing fixing legacy software when the kids out of school only know how to point and click through their GUI IDE's and don't know the difference between a short, an int, a long, and a long long... and time_t is completely foreign to them.

  20. Re:WP article much better by LDAPMAN · · Score: 2

    I've actually seen some situations close to your example. Imagine 286 desktop machines running Netware 2.X for SAA. It was at a hospital and the only guy that knew anything about them had been dead for almost 6 years. Finally enough of them failed to impact connectivity to the mainframe.

  21. Re:64-bit computers DO NOT solve this problem by HaZardman27 · · Score: 5, Funny

    I am quite looking forward to having the option of some lucrative consulting income in my early retirement should I decide I need it. :-)

    Then my goal is to thwart your retirement plan. I will contract a low-wage programmer from a yet-to-be-determined developing country to write a piece of software that corrects the issue in any source code and recompiles it for you. I'll sell licenses for $1kUSD a pop, which by 2038 will only be enough to cover the cost of a McDonalds Synthetic Cheeseburger Paste from the Value Menu.

    --
    Apparently wizard is not a legitimate career path, so I chose programmer instead.
  22. In 25 years? by hduff · · Score: 2

    Not a problem since we'll all be running Windows 11 by then.

    --
    "I believe in Karma. That means I can do bad things to people all day long and I assume they deserve it." : Dogbert
    1. Re:In 25 years? by slashmydots · · Score: 2

      But my server doesn't have a touchscreen! lol

  23. Re:64-bit computers DO NOT solve this problem by Zordak · · Score: 5, Interesting

    I worked for a DoD contractor in 1999. Our customer had a piece of ground support software for the A-10 that they wanted to make Y2K compliant. Of course, we had to write up a detailed description of the problem and what it might affect so the customer could justify the expenditure to the bean counters. Then we had to write up a preliminary design review to get approval at the high level for what we were going to do. Then we had a critical design review so they could sign off on the detailed implementation of how we were supposed to implement the changes. I based my CDR on the code I had already written to fix the problem. Then I had to put together a testing specification so that we could prove that our date fix didn't destroy the functionality of completely unrelated code. Then we had to go test it on site, do a test report and a final project report.

    Nine month project. I don't remember for sure, but I'm pretty sure that the government spent half a million on the entire program. I was the sole technical actor. I changed something like 20 lines of Pascal code, which took me maybe a week or two. I think I spent more time figuring out how to put together their ancient tool chain than writing actual code. Your government dollars at work.

    --

    Today's Sesame Street was brought to you by the number e.
  24. Re:64-bit computers DO NOT solve this problem by Runaway1956 · · Score: 4, Funny

    Remind me to tag you as "evil bastard" if I ever look at your profile, alright? Not only do you destroy a future old man's retirement scheme, but you turn my stomach with a future menu item. Evil.

    --
    "Windows is like the faint smell of piss in a subway: it's there, and there's nothing you can do about it." - Charlie Br
  25. Re:64-bit computers DO NOT solve this problem by stoborrobots · · Score: 4, Insightful

    If you have a 64 bit PC and OS, it should be little more than a recompile.

    A number of comments have claimed this: recompile with 64-bit time_t and the problem goes away. Unfortunately, for many apps it's not quite as simple as that.

    Certainly, for those apps which only deal with time information internally, and in a transient fashion, this will be sufficient to eliminate the problem.

    However any program which persists UNIX timestamps in files, or sends UNIX timestamps as part of a networking protocol, or basically anything which sends the data structure outside the application is still going to require work on how to handle the migration.

    What happens if your app is required to talk on the network? If there are few enough machines involved, then sure, you can upgrade all of them at once, but if it's a large or distributed operation, there needs to be a transition plan. How will older clients and newer clients interoperate?

    If data is saved, how will the recompiled application interpret old files? Does it need a way to distinguish them? Can old data be automatically converted? Are there cases where old data may be compromised? (e.g. those 30 year mortgages probably have the wrong end-date stored...) How will we handle those cases?

    What about situations where time information is used to prime other calculations - is it okay to affect those other calculations? Serial numbers, PRNGs, UUID generation, etc - the situation has to be assessed. Many cases might be fine, but you can't make a blanket statement for all cases, so each calculation must be vetted.

    In the end, the result is that there is work to do. Much of it will be easy to fix, but the assessment still needs to be done.

  26. Mayan Apocalypse II by craigminah · · Score: 2

    Future generations may think we intentionally used these values (e.g. start date and 32-bit signed integer) because we somehow know/predict the Earth will end on this date...

  27. Re:64-bit computers DO NOT solve this problem by Anonymous Coward · · Score: 5, Insightful

    $0.5M to be air-tight sure that a simple 20 lines of Pascal code doesn't crash one (or more) of the hundreds of A-10s in active service, each one worth $12+M, not to mention keeping those pilots safe.

    Yes. Definitely our government dollars at work.

  28. Re:64-bit computers DO NOT solve this problem by iluvcapra · · Score: 2

    $0.5M to be air-tight sure that a simple 20 lines of Pascal code doesn't crash one (or more) of the hundreds of A-10s in active service, each one worth $12+M, not to mention keeping those pilots safe.

    You can see why people are extremely reluctant to tinker with man-rated systems.

    --
    Don't blame me, I voted for Baltar.
  29. Re:64-bit computers DO NOT solve this problem by idontgno · · Score: 3, Informative

    No, that phrase totally means exactly what he things it means, if he's using it in a sales pitch. Anything to support inflating sales and support hours.

    Remember, if you're a support contractor or consultant, anything you say means "pay me more."

    --
    Welcome to the Panopticon. Used to be a prison, now it's your home.
  30. Re:64-bit computers DO NOT solve this problem by camperdave · · Score: 2

    If you have a 64 bit PC and OS, it should be little more than a recompile.

    A number of comments have claimed this: recompile with 64-bit time_t and the problem goes away. Unfortunately, for many apps it's not quite as simple as that.

    Certainly, for those apps which only deal with time information internally, and in a transient fashion, this will be sufficient to eliminate the problem.

    However any program which persists UNIX timestamps in files, or sends UNIX timestamps as part of a networking protocol...

    Oh, IPv6 should take care of that.

    --
    When our name is on the back of your car, we're behind you all the way!
  31. Re:64-bit computers DO NOT solve this problem by Zordak · · Score: 4, Informative

    I would have to be quite a hacker to write code that would crash an A-10. This was for software that displayed actuarial data on engine health, collected by a little computer on the airplane. To get the data, you took a little box out to the airplane, sucked down the actuarial data into the little box, then went back tot the shop and hooked the little box up to the computer that ran the code I had to fix. Even if I was so elite that I could somehow use that software to re-write the code on the little box to somehow instruct it to somehow rewrite the code on the little computer on the airplane, the little computer on the airplane had absolutely no control over anything.

    Maybe if I was really, really 1337 I could have gotten it to display "ALL YOUR ACTUARIAL DATA ARE BELONG TO US" instead of the real data, but that's about the most damage I could have done.

    --

    Today's Sesame Street was brought to you by the number e.
  32. Re:64-bit computers DO NOT solve this problem by Brockeolus · · Score: 2

    The regulatory environment and culture of safety that surrounds aviation (military or otherwise) is a remarkable achievement. The complexity of the systems involved is far beyond the capacity of any single human being, even if one aspect of it seems simple or obvious to one observer.

    Every time I fly I am happy to have my tax dollars support that framework, even if it occasionally (or frequently) results in unnecessary "red tape." What's the phrase - "procedures only work if you follow them"?

  33. Re:File formats by N0Man74 · · Score: 2

    You always have to know the format of a file that you're going to use. Any file with 32-bit time fields will be known as only valid within the 31-bit range +/- January 1, 1970, any data stored with dates outside that range (and that already happens - from bank mortgages to climate change data over millenia) will use appropriate formats - in the same way that you don't store 32-bit image data in a GIF (8-bit colour index) file.

    Of course. I was pointing out that data structures don't exclusively reside in memory, and that "just recompile it!" is oversimplifying the solution.

    Sometimes these data structures are stored, and sometimes they are dumped straight to a file. Changing the size of an element of a structure that is written to a file will of course change the record sizes and offsets. If you simply "recompile for 64 bit", you may end up reading and writing your data incorrectly.

  34. lazy programmers, kicking the can down the road by circletimessquare · · Score: 4, Funny

    64-bit time ends on 15:30:08 on Sunday, 4 December 292,277,026,596

    you think the programmers in that year will be happy with the mess you left them?

    not really planning ahead now are you geniuses?

    dear coders of year 292 billion: i'm sorry, we failed you

    --
    intellectual property law is philosophically incoherent. it is your moral duty to ignore it or sabotage it
  35. Re:64-bit computers DO NOT solve this problem by bar-agent · · Score: 2

    Don't talk to me about JSON. JSON does not specify a date/time format at all.

    That means the date will be transmitted in some half-assed quote-unquote "format" imagineered by the whimpering skunk fetuses that oh-so-poorly serve as the brains of the inbred sasquatches that are writing the server side.

    You'd be amazed at how many programmers don't understand the concept of time zones.

    (Invective courtesy of Sodium Eyes.)

    --
    i'd hit it so hard, if you pulled me out you'd be the king of britain [bash.org]