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."

310 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 Anonymous Coward · · Score: 1

      The math is real, too. It's the assumptions and models used to get the final numbers that are fake. (A lot of the numbers fed *into* the models aren't usually based in reality either.)

    9. 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".'
    10. Re:Could we be a little less biased? by Bigby · · Score: 1

      Unless you are doing trillions of time operations... And just because you and I cannot think of a case where that happens, doesn't mean that case doesn't exist or will exist in the future.

    11. 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.
    12. 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.
    13. 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/
    14. 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.

    15. Re:Could we be a little less biased? by Nexus7 · · Score: 1

      This is a rare opportunity to use a Slashdot meme on itself. Like when someone complains about a bug or annoyance in Linux, they're told to fix/code it themselves.

      Well if you don't like the way the political process works, become a politician and fix it!

      They need more transparency and a much higher level of technical (hell, any) knowledge and expertise in the legislatures.

    16. 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!
    17. Re:Could we be a little less biased? by Sique · · Score: 1

      So we are on conspiracy theory territory now: "We know that every politican will lie, cheat and steal their way to riches, but because not every politician is rich or will become rich during his careerl, there must be secret ways to lie, cheat, steal and become rich." Sorry, but being a politician means just working to further your goals and objectives in the society. You are already a politician if you post on slashdot with the intention to at least change some peoples views to adhere more to yours.

      --
      .sig: Sique *sigh*
    18. Re:Could we be a little less biased? by nedlohs · · Score: 1

      So use a 64 bit machine and that "problem" goes away as well. If performance is such a concern you would be already anyway, since newer cpus are faster than old cpus...

    19. 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.

    20. 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.

    21. Re:Could we be a little less biased? by TubeSteak · · Score: 1

      For example, the staff at the Congressional Budget Office who actually do the math do not directly report to any politician.

      The CBO frequently has to write reports based on (bad) assumptions that are baked into proposals or laws.
      Example:

      [Former VP candidate Paul] Ryan isn't alone in directing the CBO to assume some level of success for his policies. Politicians from both parties routinely specify spending limits and then brag about the results. But Ryan's budget is unusual in the numbers of rules it specifies, and the level of success it assumes for its policies.

      --
      [Fuck Beta]
      o0t!
    22. Re:Could we be a little less biased? by shawnhcorey · · Score: 1

      time_t has also been 64 bit for a number of years now

      "time_t has also been 64-bit for a number of decades now" Fixed that for you.

      --
      Don't stop where the ink does.
    23. Re:Could we be a little less biased? by Guy+Harris · · Score: 1

      time_t has also been 64 bit for a number of years now

      ...on most (all?) 64-bit platforms and on those 32-bit platforms that have gone with 64-bit time_t .

      At least as I read the Visual Studio 2012 documentation, time_t is 64-bit by default; you have to define _USE_32BIT_TIME_T to get a 32-bit time_t. This goes back as far as Visual Studio 2005; in Visual Studio .NET 2003, it's a "long integer", which is 32 bits in Microsoftland.

      A quick check of my Solaris 11 (virtual) machine's /usr/include indicates that it defines time_t as a long, so it's 64 bits only for 64-bit code (can't break binary compatibility...), so only 64-bit code avoids the Y2.038K problem on Solaris. A quick check of that machine's host, running OS X Mountain Lion, reveals the same thing (again, can't break binary compatibility...), so only 64-bit code avoids the Y2.038K problem on OS X.

      I'm not certain what headers are used when compiling 32-bit on, for example, my (64-bit) Ubuntu 12.04 (virtual) machine, but, if I compile a program that prints sizeof(time_t) with -m32, it prints 4.

      So, on two fairly significant UN*Xes, time_t appears to be 64-bit only for 64-bit code. Now, it may well be that, well before 2038, for desktop and server computing, and possibly even smartphone/tablet computing, all libraries and applications will be 64-bit.

      However...

      So it's not a real problem even on embedded systems

      ...I wouldn't necessarily assume that. The good news is that truly embedded systems (I don't consider smartphones etc. to be embedded systems, as, even if they don't support development tools running on them, they can run third-party applications, and thus might be subject to binary-compatibility issues) don't have the sort of binary-compatibility issues that would force them to keep time_t 32-bit. However, if they're running a software platform that, by default, makes time_t 32-bit on 32-bit processors, unless they've made an effort to override that default, time_t is 32-bit. Hopefully the lifetime of those embedded systems is sufficiently short (and the developers of those systems sufficiently clueful) that anything with 32-bit time_t gets replaced in time.

      All that over and above...

      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.

      ...what you've already noted, in addition to file formats with 32-bit time stamps (e.g., pcap format; fortunately, pcap-ng format can, with time stamps with nanosecond resolution, last until 2554).

    24. Re:Could we be a little less biased? by kry73n · · Score: 1

      A case where a 64-bit ALU is of an advantage is everywhere where you have to deal with a lot of throughput, for example: compression algorithms, image processing where you need a lot of copying to and from ram and so on...

    25. 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/
    26. Re:Could we be a little less biased? by isorox · · Score: 1

      ...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.

      And Y2K for that matter, at least until they destroyed all the guns...

    27. Re:Could we be a little less biased? by fatphil · · Score: 1

      > the Y2.038K problem

      The S2Gi problem, surely?

      --
      Also FatPhil on SoylentNews, id 863
    28. 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
    29. 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.

    30. Re:Could we be a little less biased? by countach · · Score: 1

      While I don't doubt there are programs out there with these bugs, it seems a lot different to the Y2K bug in that the fix is to just change your variables to 64 bit. The Y2K problems in large part involved LOGIC changes, and user interface changes, which was a whole different ball game in complexity. This is just fixing some silly little declarations and recompiling.

    31. 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).

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

      Oh, and...

      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.

      No, nothing was added to support doing 64-bit adds in a single instruction until x86-64.

    33. Re:Could we be a little less biased? by tacokill · · Score: 1

      Excuse me but who the fuck are you talking about?

      Every single senator and congressman leaves Congress wealthier than when they came in (by a lot!). How do you think that happens?

      Go read up. Literally, there isn't a single exception. Some are worse than others but nobody should be generating wealth like these guys with their ~$160K salary. Yet, somehow every single one of them leaves Congress with a net worth north of 5-10million. Much more in the worst of the worst cases....

    34. Re:Could we be a little less biased? by circletimessquare · · Score: 1

      because that's politics

      the man who wins is the man who appeals to as many people as possible

      if you bend your opinion and your words just enough, you can appeal to even more

      and if you lie in such a way that you don't really stand for anything at all but make everyone think you stand for their opinion, then you can appeal to most everyone

      that wins the election

      at the price of being an empty suit, having no soul, and leaving nothing but a taste of bitterness and regret in everyone's mouth and making everyone feel like you lied to and betrayed them

      it's our system of voting, actually. the mathematics of our election system gives us the politicians we have

      the way to solve it is thusly:

      http://en.wikipedia.org/wiki/Borda_count

      or

      http://en.wikipedia.org/wiki/Approval_voting

      the idea is to better capture the true intent of voters, while still being a simple system

      of course, this will probably never happen, but this is the way forward

      --
      intellectual property law is philosophically incoherent. it is your moral duty to ignore it or sabotage it
    35. Re:Could we be a little less biased? by ByOhTek · · Score: 1

      GP was probably sarcasm, since the teabaggers are pretty much entrenched in the same dishonest political status quo as the rest of the political parties/groups.

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

      Not necessarily.

      Most of them are pretty damn well off. Also, if you look at it, they are in a relatively low-risk setup. Other people are paying for their risks (running), and they don't have a huge cost of losing, while they have a great gain for winning.

      --
      Self proclaimed typo king, and inventor of the bear destroying coffee table (patent not pending).
    37. 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).
    38. Re:Could we be a little less biased? by Bing+Tsher+E · · Score: 1

      It's disappointing how much people rant about politicians and money. The worst, most dangerous politicians, are engaged in gathering ever more power for themselves and their organizations. The ones dabbling in graft who have an endgame where they don't die in office are the less dangerous sorts.

      Money is certainly a corrupting factor, but it's those politicians who have an ideology driving them who do the most damage to the rest of our lives. People like Barney Frank, Ted Kennedy, Newt Gingrich and Jesse Helms come to mind. We can only wish these dudes wanted a pile of money and would then leave the rest of us the fuck alone.

    39. 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
    40. Re:Could we be a little less biased? by kmoser · · Score: 1

      This is a rare opportunity to use a Slashdot meme on itself. Like when someone complains about a bug or annoyance in Linux, they're told to fix/code it themselves.

      Well if you don't like the way the political process works, become a politician and fix it!

      They need more transparency and a much higher level of technical (hell, any) knowledge and expertise in the legislatures.

      Problem is, people who enter the halls of Congress automatically get infected by a virus which corrupts their ethics. It has been shown that even a complete reinstall/reboot of Congressmen doesn't fix the problem, indicating that the malicious code is embedded somewhere in the genetic firmware of human nature.

    41. Re:Could we be a little less biased? by lsatenstein · · Score: 1

      I worked in Banking software for 20 years. We were not super intelligent, but we did standardize on using julian calendar routines. We did not use Unixtime.
      Unix time is definitely not a problem. I say that because we use the entire 32bit number. Want another 35 years to go with it. Assign a one byte field in the kernel. If the byte is zero, the date represented by the 32bit number precedes 2038. If it has a binary one, it is post 2038. Julian date or one based on the number of days since 1600. will make business life a date worry free activity.

      --
      Leslie Satenstein Montreal Quebec Canada
    42. Re:Could we be a little less biased? by DeVilla · · Score: 1

      Well a lot of us spend time fixing, testing and upgrading to make sure y2k didn't to get youuuuuuuuuuuuuuuuuu. The job would have been easier if we would have had more time. Fear of (or customer interest in) y2k came late enough that it was a rush job. Be glade if people start addressing it sooner this time.

      However, it got a friend of mine. Part way through 1998 he got a notice that his lifetime subscription to a ham radio magazine would expire. Naturally he called the magazine company, as one would, to ask them if they knew something he and his doctor should be aware of.

  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 Anonymous Coward · · Score: 1

      And your point is?

      #include <ctime>
      #include <iostream>

      int main()
      {
                      std::cout << "The time_t on Linux is " << sizeof(time_t)*8 << " bits.\n"
                                                "HTH\nHAND\n";
      }

      Gives:

      The time_t on Linux is 64 bits.
      HTH
      HAND

    3. 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 ;-)

    4. Re:Not NetBSD by mgcleveland · · Score: 1

      The problem is with systems already deployed and legacy systems still running on 32-bit OSes, not those that have switched over to 64-bit architectures.

    5. 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.

    6. Re:Not NetBSD by gweihir · · Score: 1

      At least 64 bit Linux has too. The only 32 bit installation I have (on a Raspberry Pi) has not.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    7. Re:Not NetBSD by WilyCoder · · Score: 1

      Don't forget the Rpi doesn't even have a real time clock...

    8. 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
    9. Re:Not NetBSD by gweihir · · Score: 1

      Yes, I know. A limitation found on quite a few other embedded systems. My intuition is that on something without real-time clock, this issue cannot be important.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    10. Re:Not NetBSD by Murdoch5 · · Score: 1

      The issue isn't how many computers have moved over, the issue how many computers haven't. It takes one old computer on the backbone of a network that everyone forgot about to cause the issue. Sure all the production and mainstream systems will or should have protection setup to deal with it, but in the midst of all of that there will be the one program or the one computer that can't be converted and when time overflows that computer / program will cause all hell world wide to fall out.

      Also there is alot of system that can't be touched, many embedded systems wont / can't understand 64 bit data types or even 32 bit data types, so well they can start to port time over to a 64 bit storage container, it won't matter because not everything can go 64 bit.

    11. Re:Not NetBSD by Anonymous Coward · · Score: 1

      The C Standard does NOT guarantee that:
      1) a byte is 8 bits.
      2) all bits in a type other than char (plus signed/unsigned char) are usable.

    12. 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.
    13. 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.
    14. 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!"
    15. Re:Not NetBSD by lordholm · · Score: 1

      Compile that with -m32 and you will see that time_t is 32 for many Linux systems, you are probably building a 64 bit app by default. You think, no 32 bit compiled software exists?

      --
      "Civis Europaeus sum!"
    16. Re:Not NetBSD by eek_the_kat · · Score: 1, Insightful

      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.

    17. 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.
    18. 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.

    19. 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?
    20. Re:Not NetBSD by Anonymous Coward · · Score: 1

      By that time, we would have already moved to 1024-bit processors with 1024-bit OS and 1024-bit apps.

    21. Re:Not NetBSD by Medievalist · · Score: 1

      Just like VMS and others did in the early 1980s?

      Oh, no, wait, those OSes were actually designed by people who could tell that years do add up... those guys must have been so smart - they probably passed third grade math!

      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.

      PCs and IBM mainframes had no such excuse in 1999. The design and practices were just insanely stupid, from silicon all the way up to applications - who the hell can design and program a computer, but can't figure out that the human experience of time is a continuous function?

    22. 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...

    23. 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.

    24. Re:Not NetBSD by Anonymous Coward · · Score: 1, Informative

      Err, airplanes routinely fly much much longer than 10 years.

    25. Re:Not NetBSD by Millennium · · Score: 1

      As much as I would love to believe this is true, it's worth pointing out that the same things were said 25 years before Y2K, and there was still a lot of code that had to be handled.

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

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

    27. Re:Not NetBSD by Quila · · Score: 1

      You can still find the old 8-bit 6502 in microcontrollers these days.

    28. 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
    29. 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.

    30. Re:Not NetBSD by Bigby · · Score: 1

      By that time, we won't be using binary digits (bits). We will have 3+ digits.

    31. Re:Not NetBSD by iluvcapra · · Score: 1

      The average age of a commercial Boeing airliner is 14.7 years. Some planes in the Delta/American combined fleet date from the 1960s, and a lot of the 737s you ride in today are 70s-80s vintage.

      The inspections and maintenance schedules required to make them as safe as they are have the side-effect of making the last a lot longer than automobiles.

      --
      Don't blame me, I voted for Baltar.
    32. Re:Not NetBSD by ChronoFish · · Score: 1

      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.

      Also With today's virtualization, all that *legacy* Hardware is still running at 32-Bit, even if the actual hardware is 64-Bit, 128-Bit, or what-ever. Simple matter of updating your virtual systems to 64-Bit? No, because your software is paired with databases that expect values to be a certain size.

      It's much harder problem then it's getting credit for and there will be systems that don't or can't get upgraded and will cause issues at some level. A large percentage of the issue will probably be very subtle and hidden (hard to find / non-obvious).

      -CF

    33. Re:Not NetBSD by oobayly · · Score: 1

      And, very few systems shipping today will have 32 bit time_t

      That's what I thought, but when I compiled and ran this it returned 4 for everything (3.2.0-36-generic-pae)

      #include <ctime>
      #include <stdio.h>

      int main(int argc, char** argv) {
                      printf("sizeof(time_t)\t= %d\n", sizeof(time_t));
                      printf("sizeof(int)\t= %d\n", sizeof(int));
                      printf("sizeof(long)\t= %d\n", sizeof(long));

                      return 0;
      }

      Granted, I may be being bloody stupid here, but I'm a tad confused.

    34. Re:Not NetBSD by Anonymous Coward · · Score: 1

      You have fooled some moderators with assertive statements, but you don't appear to have a firm grasp on some of the things you're spouting off about (e.g., linux 64-bit was in 1999, commercial aircraft are in service far longer than 10 years, mainframes are supported longer than 10 years, etc).

    35. 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,

    36. 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.
    37. Re:Not NetBSD by iamgnat · · Score: 1

      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.

      This sentiment seems familiar. I wonder where I've heard it before? Oh yeah, the idiots that thought Y2K was way overblown because they believed that A) developers would never do something as stupid as work with year information in a 2 digit format in modern code and B) all that old code had long since been updated or replaced. Developers (on their own or at the direction of management) will always take short cuts and it's usually the worst/sloppiest code that seems to have the longest life.

      You also have to remember that many "programmers" today learned by using examples from the web which continue to propagate bad ideas (see PHP and SQL Injections that just won't die because of the horrid form processing examples all over the web) and you end up with a bunch of people doing 'printf("Time is %d\n", (int) time(NULL));' without understanding that it is wrong.

      Oh well I suppose the upside from no one learning from Y2K is that like all the retired COBOL programmers for Y2K us C and C++ programmers will be able to come out of retirement for a few years and sock away enough extra cash to spend the rest of our retirement on a nice beach somewhere...

    38. Re:Not NetBSD by ElDuque · · Score: 1

      I still don't think its accurate to say planes with age greater than 10 years undergo "many many many major overhauls, to include electronics"

      United's 777's were mostly delivered between 1995-2000 and I bet the only major electronics upgrades were to the passenger entertainment systems.

      https://sites.google.com/site/unitedfleetsite/mainline-fleet-tracking

    39. Re:Not NetBSD by Anonymous Coward · · Score: 1

      The Pang-Galactic Empire runs all its major processing on the IBM z-Series processors. They run with a 128 bit TOD clock. This clock is actually a special 128 bit register in the system which is automatically monotonically incremented by the hardware , not a memory area; and each access is guaranteed to get a unique and increasing value (within the local system, not globally). And the majority of the current z-Series software (not user written) is already using this clock value.

      Too bad IBM and all the other computer vendors will be executed by the Caliphate when it takes over the world.

    40. Re:Not NetBSD by nautsch · · Score: 1

      $ ./timesize
      sizeof(time_t) = 8
      sizeof(int) = 4
      sizeof(long) = 8

      make an update some time, eh?

      --
      If you find a typo, you may keep it.
    41. Re:Not NetBSD by OffaMyLawn · · Score: 1

      Having your brain smashed out by a slice of lemon wrapped around a large, gold brick.....that does sound appealing most days.

    42. Re:Not NetBSD by aaaaaaargh! · · Score: 1

      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.

      ??? I know people who drive 30 year old cars and certainly not as collector items.

      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.

      Make that 30 years, too. Yes, the electronics will get overhauled during that period, as all the other things, except for the software. It's part of an ultra-expensive validation and certification process that will not be repeated unless strictly necessary.

      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.

      Fair enough, but you're missing the #1 use of computing devices: embedded systems. For most of them there is no reason to go 64bit, many of them are still 8 bit even. My calculator uses a Z-80 processor from the 70s, these CPUs are becoming less common but are still in production.

    43. Re:Not NetBSD by davydagger · · Score: 1

      the only way it should be affected is if your files had a negative date, before 1970

      otherwise just pad the 31 most significant bits with zeros. converting a 32bit signed to 64 bit signed interger should be trivial.

    44. Re:Not NetBSD by davydagger · · Score: 1

      "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."

      Military aircraft might have the same model numbers, but the guts will change throughout the service life. Even if the serial numbers, and even the airframe are the same, there is no KC135 in service that is the same parts you touched in the 80s, or your dad in the 60s.

      Specifiably the electronics get overhauled every couple of years, to be retrofitted to new model specifications. same with the B52. the basic design has been in service forever, but the plane has been overhauled many times on the inside.

      "As for cars, as long as they allow '68-'72 Chevys on the road, i'll be happy."
      not without replacing your valve seats, to make sure new lead free gas doesn't chew them to shreds. Find me a 68-72 chevy on the road that hasn't been overhauled. not entirely dissimilar. But sure, they'll be on the road, with QQ plates. This doesn't affect anyone but a handful of collectors, people who don't depend on these old cars.

      the solution is simply recompiling for 64 bits, easier than changing valves

    45. Re:Not NetBSD by nedlohs · · Score: 1

      I found one!

      $ uname -im
      sun4u SUNW,Ultra-2
      $ ./a.out
      sizeof(time_t) = 4
      sizeof(int) = 4
      sizeof(long) = 4
      $ g++ --version
      2.95.2

      What do you mean "from the last millennium"?

    46. Re:Not NetBSD by eek_the_kat · · Score: 1

      Oh yea, that whole financial industry that was supposed to collapse at Y2K. In this context, if active applications encounter issues like these, they will be fixed well before any critical moment. Joe schmo can't manage his tbills 2032... oh noes it's going to take us 6 years to fix that! Developers like to whine so much. I have been coding long enough to know exactly how long 25 years is. 32bits will be but a fart in the wind.

    47. Re:Not NetBSD by eek_the_kat · · Score: 1

      Ha. Any retired Cobol developer will most likely be dead by 2038; well into their 70s. What were we coding on 25 years ago? Oh yea, 386's if you were lucky. ooo 40mb hard drive!!! Geeks piss and moan so much. It makes them feel wanted. My point is technological evolution will solve 99.99999% of any of this. People will recall 32bits like putting your 286 into turbo 8mhz mode.

    48. Re:Not NetBSD by Medievalist · · Score: 1

      Sounds great, but I loaded OS from paper tape (TSX and RSX-11) in the 70s and 80s and I've never used that as an excuse for stupidity. Every app I ever wrote assumed that years would increment predictably.

      And I know at least a half dozen mainframe programmers who were still storing two-digit EBCDIC dates in mid-1999 - that's in NEW processes, mind you! More bytes for less data.

      And in the 1970s my grandfather, who was born in 1899, was still very much alive - despite constant computer malfs at the veteran's administration and IRS due to retarded programming. There was never a time where 2 digit years were really an acceptable practice, ever. Not ever.

      I actually wrote code to find and flag perl applications using two-digit ASCII dates somewhere around March of 2000. It was still periodically triggering in 2004. I kid you not.

      The raw fact is that some programmers are idiots. And some of them wrote commercial OSes. But like I said, I'm willing to give *nix a pass since it was not originally built for end-users, and willing to give NetBSD credit for making the required change.

    49. Re:Not NetBSD by Darinbob · · Score: 1

      Even 64-bit isn't good enough to be universal time. It's resolution is one second, so it's useless when trying to measure things less than that. The original signed 32-bit time was intended for a system in the 70s and 80s where it was used to store a time stamp for a file on a hard disk or attach the current date to a log or mail message. There was nothing wrong with that. It only broke down because people turned that 32-bit value into a defacto standard for time representation in use decades later and used for other purposes.

      Too many programmers want to deal with only one universal time domain, hopefully with routines built into their system already so that they don't have to think about it.

      Personally, I think they should have renamed the Unix routines when they went to 64-bit, so that the naive programmer is made aware that this is now a different and distinct time domain.

    50. Re:Not NetBSD by eek_the_kat · · Score: 1

      Do you realize how long 25 years is? Do you know what technology was like 25 years ago? As someone who works in the finance industry in nyc, I can honestly say I rarely see anything over 10 years old. And if it is that old, it deserves to fail. I know of 1 mainframe, and it isn't mission critical because of all the downtime it requires.

    51. Re:Not NetBSD by Darinbob · · Score: 1

      Any method is perfectly adequate if it serves the current needs and is not misused as appropriate to other application types. So the signed 32-bits was not broken and was just fine for its intended purpose. However it is inappropriate to use to calculate 30 year mortgages today, and any programmer doing so is naive. The naivete comes from assuming time_t, time(), difftime(), etc, are all general purpose and valid for any domain (and even if time_t is 64 bits it is still naive).

    52. Re:Not NetBSD by Guy+Harris · · Score: 1

      The time_t was, in many cases, switched to 64bit even in 32bit OSs.

      And, in other cases, apparently not switched to 64-bit on 32-bit platforms.

    53. Re:Not NetBSD by Guy+Harris · · Score: 1

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

      IBM mainframes went 64-bit in 2000. Opteron came out in 2003, so, yes, x86 went 64-bit after System/3x0 did (by 3 years). However, System/3x0 (feel free to set x = 10 for z/Architecture :-)) went 64-bit long after, for example, MIPS did.

      But, yes, at least for non-embedded computing, we probably won't have a lot of 32-bit machines, and most if not all 64-bit software platforms that have time_t have a 64-bit time_t.

    54. Re:Not NetBSD by Guy+Harris · · Score: 1

      Even 64-bit isn't good enough to be universal time. It's resolution is one second, so it's useless when trying to measure things less than that.

      That's what, for example, struct timeval is for. It's 96-bit on most if not all 64-bit platforms (64 bits of seconds-since-the-Epoch, 32 bits of microseconds since that second), probably padded to 128 bits by the compiler. struct timespec is similar, but with nanosecond resolution.

      Too many programmers want to deal with only one universal time domain, hopefully with routines built into their system already so that they don't have to think about it.

      You mean like "seconds-since-the-epoch and fractions of a second since the second in question"?

      Personally, I think they should have renamed the Unix routines when they went to 64-bit, so that the naive programmer is made aware that this is now a different and distinct time domain.

      And it's "now a different and distinct time domain" in what way (other than "it has the same origin, just a bigger range")?

    55. Re:Not NetBSD by Guy+Harris · · Score: 1

      Sorry, no workie....

      $ g++ -m32 -Wall -O3 time_t.C
      In file included from /usr/include/c++/4.7/x86_64-linux-gnu/32/bits/os_defines.h:40:0,
      from /usr/include/c++/4.7/x86_64-linux-gnu/32/bits/c++config.h:414,
      from /usr/include/c++/4.7/ctime:43,
      from time_t.C:1: /usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
      compilation terminated.

      OK, let's try C, instead (I got a linker error when I tried that on my 64-bit Ubuntu 12.04 virtual machine):

      $ ed time_t.c
      time_t.c: No such file or directory
      a
      #include <stdio.h>
      #include <time.h>

      int
      main(void)
      {
      printf("On this machine, time_t is %zu bits\n", sizeof(time_t)*8);
      return 0;
      }
      .
      w
      136
      q
      $ gcc -m32 time_t.c
      $ ./a.out
      On this machine, time_t is 32 bits

    56. 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.

    57. Re:Not NetBSD by steelfood · · Score: 1

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

      You are very, very short-sighted then.

      Just on airplanes, there are plenty of 25-35 year-old airplanes in service, both in civilian and military avation. A lot of low-budget airlines will buy used planes from the major airlines. Some of the major airlines will use older planes for lesser-travelled, short distance routes.

      Same goes with the military. There are planes from the 60s and 70s that are still operational. The F-15 and F-16 are still in operation, if not in the states, then in other countries. The B1 is still in use. The C-130 is from the 50s!

      I won't even go into other mostly-public systems that make up our power and transportation infrastructure. Those are from the 70s or older, and it will be far more than another 25 years before they retire.

      --
      "If a nation expects to be ignorant and free in a state of civilization, it expects what never was and never will be."
    58. Re:Not NetBSD by gweihir · · Score: 1

      Complete BS. No wonder you post as AC. And a "real-time" clock has nothing to do with real-time. You do not even get what "real-time" means: It means that you have specific, previously known, maximum reaction times. Whether that is picoseconds, seconds, or years is immaterial. And no, if a system does not have its own clock, verifying certificate expiry cannot really be done in a meaningful way, manipulating OS-kept time via NTP attacks is easy.

      To sum up: Your comment is a complete and utter fail. But you already knew that.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    59. Re:Not NetBSD by twistedcubic · · Score: 1


      TODAY 32 bit UNIX systems are legacy. both in hardware and software.

      What about instances in "the cloud"? Many people use 32bit OS on their VPS because it's easier to get their SQL databases (or whatever) inside 512MB of RAM or less.

    60. Re:Not NetBSD by Darinbob · · Score: 1

      Different domain because they cover a different range, aren't interchangeable, and were intended for different purposes.

    61. Re:Not NetBSD by Greyfox · · Score: 1
      Stop ruining my coming-out-of-retirement plans! Heh heh heh.

      Besides, I'm sure there will still be some jackass running SCO Xenix on a 386 in a back room somewhere. I'd lay pretty good money they'll have lost their source code, too. Well not lost, exactly. The 5 1/4" floppy disk will be right where the programmer left it, in the tape safe. Sadly however, the drive will have given up the ghost 10 years ago (From now, not from then,) and no one will be able to read it anymore. I know this is true, because I know this industry. This sort of thing has been going on for years. And when those people come looking for help, they're going to fund several of my organ replacements. Hopefully by then I'll be able to buy glowing Terminator parts.

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    62. Re:Not NetBSD by Guy+Harris · · Score: 1

      Different domain because they cover a different range

      With the same origin, just different limits.

      aren't interchangeable

      32-bit time_t can be trivially converted to 64-bit time_t.

      and were intended for different purposes.

      No, they aren't.

    63. Re:Not NetBSD by tehcyder · · Score: 1

      If we even are alive by then.

      Always nice to see one of our junior readers contributing to slashdot. Welcome, son!

      --
      To have a right to do a thing is not at all the same as to be right in doing it
    64. Re:Not NetBSD by cthulhu11 · · Score: 1

      That's terrific for *both* users!

    65. Re:Not NetBSD by chris.evans · · Score: 1

      Temporary fix, what we need is some date time compression using tokens to shrink the size of the time_t variable value down

    66. Re:Not NetBSD by metaforest · · Score: 1

      uname -a
      Darwin islabquad 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386

      vi time.c
      a
      #include
      #include

      int
      main(void)
      {
      printf("On this machine, time_t is %zu bits\n", sizeof(time_t)*8);
      return 0;
      } :wq
      gcc -m32 time.c ./a.out
      On this machine, time_t is 32 bits

      fail in 32 bit mode.

    67. Re:Not NetBSD by Guy+Harris · · Score: 1

      fail in 32 bit mode.

      So what are the errors you see?

      Perhaps you need to install some "32-bit development support on 64-bit machines" package(s). (My test was on OS X, where there are no special packages of that sort; there's only one set of header files, with #ifdefs used in those cases where you have to do things differently on different platforms, and with libraries distributed as fat binaries; lacking fat binaries, and having a somewhat larger set of platforms to support, Linux distributions may not make 32-bit-target-on-64-bit-host work by default.)

    68. Re:Not NetBSD by metaforest · · Score: 1

      With the exception of slashdot eating the time.h and stdio.h header includes, the transcript of the session is what I did and what I got. The result I expected was that time_t is 64 bits even in 32 bit ABI for new code. Now it does work as expected in 64 bit ABI (the default compile behavior for my version of OSX).

    69. Re:Not NetBSD by Guy+Harris · · Score: 1

      The result I expected was that time_t is 64 bits even in 32 bit ABI for new code.

      And you now know that OS X and Linux work the same here (32-bit ABI has 32-bit time_t).

    70. Re:Not NetBSD by metaforest · · Score: 1

      Glad I checked.... it hadn't come up in anything I worked on. So in the future I say "no!" to 32-bit ABI unless there is a compelling reason not to.

    71. Re:Not NetBSD by rubycodez · · Score: 1

      which doesn't help in the slightest if you are running programs that can't handle it, like say certain mysql types.

    72. Re:Not NetBSD by rubycodez · · Score: 1

      most places don't read their mysql error logs. they might read front end web or app logs, but that's all. they'll be fucked.

  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. Re:Unsigned! by WaffleMonster · · Score: 1

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

      It signals invalid value/error/failure. While you can promote wire protocols to use unsigned 32-bit ints it does not work in the OS space.

    7. Re:Unsigned! by Darinbob · · Score: 1

      The original signed 32-bit could not represent dates of birth for some people alive at the time Unix was invented in the 70's! The unix time was never meant to be about this sort of stuff, it was meant to be about times of files and the current time on the system.

    8. Re:Unsigned! by frisket · · Score: 1

      Some applications need to represent times before 1970

      Historians need to deal with calendar dates from the earliest recorded documents (those clay tablets from about 5500 BC? IANAH)

  6. Is it a real problem? by ruir · · Score: 1

    As far as I am aware, only old Unix computers still use 32-bit time_t vars...

    1. 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.

    2. Re:Is it a real problem? by Omegium · · Score: 1

      Yes, the operating systems themselves will probably be fine by then. But what about programmers who had to do date calculations in a language without a good date object? They put dates in an int, and added 3600 for each hour. What about databases where timestamps are stored in plain ints, instead of a special time value? And then there are embedded systems of course, from microwaves to airplanes to networking equipment

    3. Re:Is it a real problem? by petermgreen · · Score: 1

      32-bit linux systems use 32-bit time_t.

      But as I mention at http://slashdot.org/comments.pl?sid=3399939&cid=42657319 the real problem is not so much the OS (most systems will probablly be running a 64-bit OS within the next decade) but the applications.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
    4. Re:Is it a real problem? by marcosdumay · · Score: 1

      They put dates in an int, and added 3600 for each hour.

      Great, because when compiled to a 64 bits target, their 'int' will have 64 bits.

      What about databases where timestamps are stored in plain ints, instead of a special time value?

      Is there still any database with 32 bits integers? In postgres you'll have to typecast to get one, I'm not aware of any means to get one in MySQL... Did the proprietary world come along?

    5. Re:Is it a real problem? by monkeyhybrid · · Score: 1

      I occasionally see things like central heating controllers / thermostats in use that date back at least twenty years or so. It's not absurd to think some of today's embedded systems will still be in use in 2038.

    6. Re:Is it a real problem? by ruir · · Score: 1

      I cant get it. I have programmed in C for years, and could swear by now every library/header would be using 64-bit (long) time_t by now. But indeed I just tried an example program and it is indeed still 32-bits time_t for 32-bit linux. Stupid, what are they waiting for?

    7. Re:Is it a real problem? by WaffleMonster · · Score: 1

      It's defined as long so will be 32 on 32 and 64 on 64. Changing it to 64 breaks all APIs for legacy programs. Simply compiling as 64bit on 64bit fixes the code it, so it just means migrating from 32 to 64 bit. That just leaves file formats and network protocols to fix.

      Nonsense the ABI does not have to break to change the datatype of time_t. It can be patched in the compiler with a switch. The only problem is lack of will.

    8. Re:Is it a real problem? by Guy+Harris · · Score: 1

      Nonsense the ABI does not have to break to change the datatype of time_t.

      The ABI has to change to change the datatype of time_t.

      It can be patched in the compiler with a switch.

      And that will magically cause all existing binaries (the "B" in "ABI") to be recompiled to have a 64-bit time_t? If not, then, at least for dynamically-linked binaries, changing the size of time_t, and shipping systems with 32-bit system libraries that expect time_t to be 64-bit, will break binary compatibility.

    9. Re:Is it a real problem? by WaffleMonster · · Score: 1

      The ABI has to change to change the datatype of time_t.

      Does not.

      And that will magically cause all existing binaries (the "B" in "ABI") to be recompiled to have a 64-bit time_t?

      I assume this is rhetorical.

      If not, then, at least for dynamically-linked binaries, changing the size of time_t, and shipping systems with 32-bit system libraries that expect time_t to be 64-bit, will break binary compatibility.

      This is where the "compiler switch" comes in. If I want 64-bit time_t on a 32-bit platform I have that option and I know what else I need to do to make it work.

      time_t was 32-bits on windows until Microsoft updated their compiler to make it 64-bits without breaking compatibility. There is no reason other than lack of will the same can't be done on the linux platform.

      It wouldn't be the first time either I seem to recall I/O being updated to address files larger than 2^31 bytes. Old applications still have the limit. New applications or old recompiled applications magically get to address larger files.

      If not, then, at least for dynamically-linked binaries, changing the size of time_t, and shipping systems with 32-bit system libraries that expect time_t to be 64-bit, will break binary compatibility.

      It will also be incompatible with network protocols and persistant storage which assume 32-bit storage of this field. None of this is a valid excuse for lack of action.

    10. Re:Is it a real problem? by Guy+Harris · · Score: 1

      The ABI has to change to change the datatype of time_t.

      Does not.

      That depends on what you consider a change.

      For example, a struct stat contains several time_t values; if the size of time_t changes, the layout of that structure changes, and a program that calls stat() passing it a structure with the layout for 32-bit time_t will not work very well if stat() fills in a structure with the layout for 64-bit time_t.

      You could use a similar technique to what Apple did for a number of structure changes, and have a bunch of stat$ xxx routines, with different struct stat structures, and hacks to arrange that calls to stat() get turned into calls of the appropriate routine, depending on whether you compile with the "64-bit time_t" flag or not. This doesn't change the ABI for existing routines, although it does introduce new routines to the ABI.

      Or you could ship two 32-bit sets of system dynamically-linked libraries, one for 32-bit time_t and one for 64-bit time_t, at which point there's no such thing as "the ABI" or even "the 32-bit ABI", there are two 32-bit ABIs.

      If not, then, at least for dynamically-linked binaries, changing the size of time_t, and shipping systems with 32-bit system libraries that expect time_t to be 64-bit, will break binary compatibility.

      This is where the "compiler switch" comes in.

      This is where the "compiler switch" and library work come in.

      time_t was 32-bits on windows until Microsoft updated their compiler to make it 64-bits without breaking compatibility.

      Microsoft have the advantage that, as far as I know, no "system APIs" use time_t, so it's used only by the C library and maybe some third-party libraries; I have the impression that executables are either statically linked with the C library or ship with a C library DLL. The "system APIs" are exported by libraries such as kernel32.dll, user32.dll, and the like, and those libraries define the ABI.

      Unixland works differently; "system APIs" do use time_t, so either you'd have to statically link with the libraries that provide those ABIs (not supported at all on OS X, doable but no guarantee of binary compatibility on Solaris, dunno what's done on other commercial UN*Xes, dunno how binary-only applications are shipped for various Linux distributions), or you'd have to ship dynamically-linked versions of those libraries (which would still mean you're shipping code that makes assumptions about the implementations of those APIs that are not guaranteed to remain valid from release to release), ship only binaries that work with the 64-bit-time_t 32-bit ABI, or ship both binaries that work with the 64-bit-time_t and the 32-bit-time_t version of the 32-bit ABI.

      The first of those is won't work at all on OS X, and is not guaranteed to work from release to release on some platforms. The second of those isn't guaranteed to work from release to release on some platforms, either.

      And, unless there's some reason to expect people to care about running 32-bit versions of your application at a time when they need a 64-bit time_t, or you don't have the resources to make your application work in 64-bit mode, you might just want to ship a 64-bit version and be done with it, in which case the vendor might simply not have a strong reason to bother providing that 64-bit-time_t 32-bit ABI.

    11. Re:Is it a real problem? by WaffleMonster · · Score: 1

      For example, a struct stat contains several time_t values; if the size of time_t changes, the layout of that structure changes, and a program that calls stat() passing it a structure with the layout for 32-bit time_t will not work very well if stat() fills in a structure with the layout for 64-bit time_t.

      Everyone is spending all of this time telling me why it can't be done without regard for the history of how these exact same issues have been addressed in the past.

      When we call stat() it is not really even stat anymore. It is more like stat64 and the stat structure is really stat64. It is all just preprocessor aliases in a header file.

      There is no reason the same thing can't be done with time_t.

      This doesn't change the ABI for existing routines, although it does introduce new routines to the ABI.

      Yes, absolutely. You will need a new round of functions for anything with time_t in it.

      Unixland works differently; "system APIs" do use time_t, so either you'd have to statically link with the libraries that provide those ABIs

      You update libraries with new round of functions. All previous software still works. New programs only work with the new set of libraries and won't run on older versions of the runtime libraries.

      And, unless there's some reason to expect people to care about running 32-bit versions of your application at a time when they need a 64-bit time_t, or you don't have the resources to make your application work in 64-bit mode, you might just want to ship a 64-bit version and be done with it

      There are still lots of 32-bit processors in the world..and lots of new ones being built each day which also can never run 64-bit linux. Arch files for currently largly non-existant 64-bit arm chips to even work didn't even exist until just very recently.

      As myself and others have mentioned we don't really have 25 years unless none of our applications do any processing into the future. Anything dealing with dates for contracts, licensing, event scheduling..etc.etc. will have to care about these issues sooner than 25 years.

      I don't see the position of 64-bit linux required for 64-bit time_t being any more valid than saying 64-bit linux is required for 64-bit file addressing. They are orthagonal issues.

    12. Re:Is it a real problem? by rubycodez · · Score: 1

      real problem, plenty of routers running 32 bit bsd, plenty of 32 bit virtual machines in enterprise vmware clusters, plenty of cities using 32 bit unix for their financial systems (15 year + life expectancy on gear) etc.

    13. Re:Is it a real problem? by rubycodez · · Score: 1

      you are wrong, the issues have NOT been addressed, plenty of 32 bit code running on 64 bit now will not make the transition because their internal binaries CAN'T be changed, there is no source (we're tallking about enterprise systems including Linux that always have prioprietary drivers, dbms, etc.)

    14. Re:Is it a real problem? by ruir · · Score: 1

      About the 32-bit unix systems in vmware cloud I am a guilty part lol

  7. 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 DougOtto · · Score: 1

      Amen Brother.

      --
      Solving Unix problems since 1989...
    2. 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.

    3. Re:Getting old by Coisiche · · Score: 1

      Indeed, the very definition of a SEP[1].

      I'll be retired by then (actually, statistically significant probability of being dead) but I don't think I'll be leaving any problems for future tech staff because...

      1. a) nothing I wrote even 20 years ago is still in use today so there being any 25 years hence seems unlikely
      2. b) as a programmer in Windows I've been using SYSTEMTIME for many years

      [1] Someone else's problem

  8. 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 Exitar · · Score: 1

      The global crysis!
      I blame UNIX for that!

    3. Re:Mortgage Calculations by Anonymous Coward · · Score: 1

      Oh really? There was no "earth-shattering kaboom" in the world of housing finance ~5 years ago?

    4. 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

    5. Re:Mortgage Calculations by plover · · Score: 1

      Five years ago there was an economy-shattering real estate crash due to shady sub-prime mortgages. Coincidence or coverup?

      Just kidding; of course it was a coincidence. But if you throw out statements like this, the conspiracy theorists come out of the woodwork. You could even say the moon landings were faked because the time on the computers of the day was kept in an 8-bit register, which rolled over during the Apollo 13 mission!

      --
      John
    6. Re:Mortgage Calculations by Waffle+Iron · · Score: 1

      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.

      Maybe that's because accountant types seem to think that the only valid numerical inaccuracies are those manifested in base 10, so they tend to use their own weird decimal number types for financial calculations.

    7. Re:Mortgage Calculations by Alid · · Score: 1

      usenet is dead imo

  9. 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.

  10. Oh No! by MyLongNickName · · Score: 1

    This could be worse than Y2K!

    --
    See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
    1. Re:Oh No! by tippe · · Score: 1

      It's time (haha) to pull those windows and mainframe programmers that saved us from Y2K out of retirement. They'll know what to do...

    2. Re:Oh No! by PolygamousRanchKid+ · · Score: 1

      This could be worse than Y2K!

      . . . and more lucrative, for retired C hackers who want to earn a few bucks . . .

      The COBOL boys had their turn with Y2K. Next up, are the C-bies.

      --
      Schroedinger's Brexit: The UK is both in and out of the EU at the same time!
  11. Just use Dice(r) Job Boards! by larry+bagina · · Score: 1

    Dice (r) is the best place to find programmers to fix your Y2k38 problems.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  12. 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.

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

    My uptime!

    1. Re:Noooooooo! by Rogerborg · · Score: 1

      It's OK, apply the MS Excel fix: just add 2038.

      --
      If you were blocking sigs, you wouldn't have to read this.
  14. 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

    1. Re:Surely we'll all be using 64bit by then. by rossdee · · Score: 1

      And the Mayan clock rollover didn't seem to cause any problems.

  15. WP article much better by bcrowell · · Score: 1

    The Wikipedia article is much better than the Byte article. (Do people still read Byte? I don't remember seeing it since the 80's.)

    One thing that seems a little different from Y2K is that this bug seems to be prevalent in a lot of embedded systems. To me that seems harder to test than a desktop system. On a desktop system, you can just set the time to Dec. 31, 2037, let it roll over, and test as much stuff as possible to see if it broke. You can't do that with a car or an airliner.

    1. 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.

    2. Re:WP article much better by Annirak · · Score: 1

      (Do people still read Byte? I don't remember seeing it since the 80's.)

      Only in strings. We migrated to Words in the late '80s, then DWords in the '90s.

    3. 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.

    4. Re:WP article much better by davydagger · · Score: 1

      given that most new UNIX systems are now 64 bit to include new ARM machines, I don't see a scenario in 25 years where we will be using anything that requires the date to work.

      will most embedded systems need the date to work as an absolute, ot just need to count seconds? Why does an industrial robot care if its 2038 or 1901?

    5. Re:WP article much better by vlm · · Score: 1

      They're probably talking about endless dependency stream style bugs.

      For example. Say your shitty GPS rx curls up and dies with the 32 bit roll over. So it either stops sending fixes to the moving map or the moving map decides not to accept post-32-bit timestamps as part of the NMEA stream. Either way the position becomes static so the calculate airspeed drops to zero. Normally it would cross check against the two tubes, but those are clogged by ice today. So the autopilot shoves the stick far over because the planes in a stall and floors the engine.

      Assuming the plane doesn't crash (and it probably won't... this is hardly the first time in aviation history that an autopilot broke) will get the trouble ticket for a broken autopilot, then has to work backward to figure out the moving map is broke, move back to find the GPS is broke...

      Even funnier would be really shitty arithmetic implementations. Like a "one" value in bit 32 is somehow, accidentally the MSB/LSB/something now added to the lat/lon. Again pissing off the autopilot into thinking you're now suddenly 15000 miles off course and need to enter a gentle turn to the north to correct. The odds of that being unnoticed and there being a mountain there are actually pretty low, but its still going to be an unholy PITA to investigate and "solve".

      Or overzealous security monster type paranoid "24 tv show fan" type firewall type design.. Why, the date "has" to be pre-32 bit, right? So filter anything "wrong" out. Whoops that makes the engine computer crash. Well thats annoying. Or the GPS isn't broken at all, but the moving map display interpretation code actually is broken. Overall just as annoying as hell.

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    6. Re:WP article much better by jandrese · · Score: 1

      25 year old cars are hardly uncommon. That's a late 80s car at this point, and you see plenty of them on the roads. The bigger question is: why would a car computer care what the date is? Most don't even have dashboard clocks anymore.

      --

      I read the internet for the articles.
    7. Re:WP article much better by stefpe · · Score: 1

      Why does an industrial robot care if its 2038 or 1901?

      Because if it's 1901, it has not been "born" yet. Duh.

  16. Since When Do Politicians Use Unix? by xxxJonBoyxxx · · Score: 1

    >> those phony programs politicians use to project government expenditures

    That's Excel in most cases, I bet. As long as spreadsheets can handle up to 50 rows and numbers up to 3000 I suspect all will be as it is today.

    1. Re:Since When Do Politicians Use Unix? by ssam · · Score: 1

      luckily Excel has an excellent record in handling dates http://www.robweir.com/blog/2006/10/leap-back.html

  17. 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?

    1. Re:Time overflowing by ChocNut · · Score: 1

      Look up John Titor.

    2. Re:Time overflowing by jovius · · Score: 1

      Zombies.

    3. Re:Time overflowing by OhSoLaMeow · · Score: 1

      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?

      I guess it depends upon whether time is signed or not.

      --
      They can take my LifeAlert pendant when they pry it from my cold dead fingers.
    4. Re:Time overflowing by servognome · · Score: 1

      If it's a Roger Corman movie, the effect will be cheesy with a sprinkle of T&A

      --
      D6 63 0D 70 89 81 BB 8E 7B 7C 5F 5D 54 EA AB 73
  18. I'll be 70 or dead by swb · · Score: 1

    So it will be someone else's problem.

  19. 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.

    1. Re:Well by gweihir · · Score: 1

      I expect that financial calculations are using 64 bit or 128 bit integers, long-numbers or at the very least (may be illegal in some countries) double. The last still gives 56 bit integer precision when misused as an integer.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    2. Re:Well by vlm · · Score: 1

      using an app that was written in the 60's, unchanged

      The problem is not the app, but the databases.

      I work, today, with new code looking at old columns that are "char" and worked around Y2K by calling today "year 113". So all code reads the column and adds 1900 to the column. We're pretty well Fed when that column hits year 2156.

      There are solutions, but they're a hell of a lot more complicated than "recompile the app" (what is this, a iphone?)

      Even "business logic" needs serious work. So the paper form has two digits for year, should the OCR read "13" as 1913 or 2013? Even worse, if that's a year of birth, both are totally realistic. You can't fix a paper form by recompiling a data analysis app.

      --
      "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
    3. Re:Well by jandrese · · Score: 1

      It would take some serious runaway inflation for 64bit integers not to be usable as a currency value.

      --

      I read the internet for the articles.
  20. Another Global Warming Scare by mtrachtenberg · · Score: 1

    Cowboy Robot is yet another example of someone trying to use "facts" to create alarm, raise money, and achieve world government. If there were really a time problem in UNIX, and I don't believe it for a moment, it's not necessarily caused by human activity. I prefer sunspots. Yeah. Sunspots.

  21. 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!
  22. Simple fix by Registered+Coward+v2 · · Score: 1

    Rebaseline the count from say 2000; if it's good enough for the Pope to do it's good enough form me. And then we'd have Old Unix and GNU Unix

    --
    I'm a consultant - I convert gibberish into cash-flow.
  23. I already warned people weeks ago by Dishwasha · · Score: 1

    http://slashdot.org/comments.pl?sid=3356429&cid=42468505

    But thanks for pointing it out again. Don't forget to stock up on Spam and Treet.

  24. When Do /. UIDs Overflow? by RedHackTea · · Score: 1

    Or are they strings... I think the DB admins should make them integers, and when they overflow, the site should just be shutdown, or new users get wrapped to low UIDs and have shared accounts.

    --
    The G
    1. Re:When Do /. UIDs Overflow? by petermgreen · · Score: 1

      I don't know for sure but I strongly suspect /. UIDs are 32-bit integers (they are too big to be 16 bit integers and 24-bit integers are unusual). How long they will take to overflow depends on how many new users join but frankly I suspect the site will be gone for other reasons long before they overflow.

      --
      note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  25. 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.
  26. typedef int64_t time_t; by Rob+Riggs · · Score: 1

    There -- it's fixed.

    --
    the growth in cynicism and rebellion has not been without cause
  27. Re:Come on! by lengau · · Score: 1

    I don't see why we'd need 128-bit time if we're counting seconds, considering that 64-bit time gets us up to 20 times the current age of the universe (meaning that 95% of the possible negative timestamps aren't just unused, but unusable if our current understanding of the laws of physics is correct).

    --
    I really wanted to change my sig to something witty, but all I could come up with is this.
  28. 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 spyked · · Score: 1

      64-bit arithmetic can be easily implemented on 8-bit devices. The problem will be upgrading the software on them, although it seems like it's doable in 25 years, even if that means going to some harder to reach place such as the North Pole.

      Of course, that's a much bigger problem if you don't have the original sources and/or if you work with legacy technologies (think: COBOL) that are more difficult to maintain these days due to the lack of people that are competent in those areas. But that just means that the demand for such solutions will rise and someone will come with one or more ways to tackle it.

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

      And those running 32-bit embedded systems can just use a new baseline for the time presentation.

      But even if you have a 32-bit system you can still handle 64-bit numbers, just not as efficient.

      --
      If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
    3. Re:embedded by phantomfive · · Score: 1

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

      A lot of embedded stuff solved the problem by starting time in 1980, or 2001, instead of 1970. You can verify this by restarting your phone, and looking at the date before it has a chance to update from the cell tower. It will not be 1970.

      --
      "First they came for the slanderers and i said nothing."
    4. Re:embedded by jandrese · · Score: 1

      How many embedded systems care what the date is though?

      --

      I read the internet for the articles.
    5. 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.

    6. Re:embedded by fatphil · · Score: 1

      Everything from digital watches to smartphones, for a start.

      --
      Also FatPhil on SoylentNews, id 863
  29. 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.

    1. Re:Shhhhh!! by Anonymous Coward · · Score: 1

      Them: "What do we do?!?!!?!?"
      You: "This is UNIX. I know this."

    2. Re:Shhhhh!! by hawguy · · Score: 1

      Them: "What do we do?!?!!?!?"
      You: "This is UNIX. I know this."

      That's almost how it will happen, except when I sit down and see a 3D virtual reality interface I'll say "This isn't Unix!" then I'll hit Ctrl-Alt-F1 to pull up a command line prompt, then proclaim "Keyboard...How quaint!" and start typing wildly.

    3. Re:Shhhhh!! by clem.dickey · · Score: 1

      "What are all these binary types?" "C++ is just so clunky" Wait - we hear that today. "Can't we just rewrite it all using q-bits?"

  30. VMS never had this problem by VAXcat · · Score: 1

    After having the time overflow on a previous offering, DEC made sure this wouldn't occur anytime soon in VMS. Quoting from the Wikipedia article on VMS, "The 100 nanosecond granularity implemented within OpenVMS and the 63-bit absolute time representation (the sign bit indicates absolute time when clear and relative time when set) should allow OpenVMS trouble-free time computations up to 31-JUL-31086 02:48:05.47. At this instant, all clocks and time-keeping operations in OpenVMS will suddenly fail, since the counter will overflow and start from zero again." VMS engineering assures us that a patch will be available to take care of this problem several years before the overflow occurs.

    --
    There is no God, and Dirac is his prophet.
  31. No lets panic by cod3r_ · · Score: 1

    Seems like we've run out of end of times theories to freak out about. Might as well use this one.. Let's pretend also that it happens Jan 1 2014 at exactly midnight. And that the world will come to an immediate end.

  32. 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.
  33. Re:64-bit computers DO NOT solve this problem by cshark · · Score: 1

    Y2k was a boom for technology contractors such as myself. The years leading up to Y2k38 will be good too. Think of all the code that will need to be totally rewritten. I know, there is that faction of people that want to see technology undo itself, and the world end, but for those of us that live in reality... it'll be great. Honestly, I wish we had these kinds of crises more often.

    --

    This signature has Super Cow Powers

  34. A real problem! by Murdoch5 · · Score: 1

    Unlike all the "big problems" in the world today, this one is real! I don't care about Kate having a baby or prince Harry smoked pot with Justin Beaver well Kim Celebrities is having an affair. This is actually a very real and important issue, yet how many people outside of the "nerd" community even know it exists. When the puck drops and Unix time overflows, I can promise you that all of a sudden what Kate's child is going to wear to her wedding is all of a sudden the least important headline in the papers.

  35. Re:that give time for there to be a PHD level clas by vlm · · Score: 1

    and your loans will be like 500K

    Per textbook

    --
    "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
  36. all of this has happened before by sribe · · Score: 1

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

    In 1988, the data processing division of NCR which provided loan processing services to small banks had still not fixed the Y2K bugs in their software. In order to make 30-year mortgages, their customers had to calculate the amortization table for a 30 year loan to figure out what the balance would be at the end of December 1999, then actually put the loan into the system as an XX year YY month loan coming due at the end of 1999 with a balloon payment of that amount. All in the hope that some time in the next 12 years NCR would fix the problem, even though the prior 18 years had not been long enough. (Well, not really. At that point all their customers were actively working on bringing their processing in-house, since the AS/400, along with a couple of upstart software companies, was making that far more practical than it had ever been.)

    Yes, I am old ;-)

  37. 67 years ought to be enough time for anybody ... by davidwr · · Score: 1

    ... for a sufficiently large value of "67 years."

    --
    Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
  38. Re:64-bit computers DO NOT solve this problem by Anonymous Coward · · Score: 1

    a McDonalds Synthetic Cheeseburger Paste from the Value Menu.

    #tagline: "A perfect blend in every bite..."

  39. Re:64-bit computers DO NOT solve this problem by marcosdumay · · Score: 1

    You'd be amazed how many people code depending on the fact that sizeof(long) == sizeof(int) == sizeof(void*) == sizeof(time_t) == 4

    Based on the fact that this stopped being true a long while ago, yes, if the number is actualy big, I'd be amazed.

  40. Re:I feel like the security guard in Austin Powers by Nationless · · Score: 1

    You think you feel silly? Imagine how the Mayans felt!

  41. Re:64-bit computers DO NOT solve this problem by jareth-0205 · · Score: 1

    Think of all the code that will need to be totally rewritten.

    I don't think that phrase means what you think it means...

  42. Re:32-bit signed integer? by Clomer · · Score: 1

    Probably laziness. You need an integer variable, you just use int without thinking about whether the value might ever go negative or not. This probably happens all the time, but it is extremely rare that it actually becomes an issue. After all, a signed int can store a number up to just above 2 billion - how often do you need to store numbers even approaching that big? The same thing happened in World of Warcraft with gold. For a while, the gold cap was (2^31)-2 copper (which translates to 214,748 gold, 36 silver, 46 copper) - which indicates they used a signed int despite the fact that it's impossible to have a negative value of money in the game.

    At some point (I'm not sure exactly when, but I think it was during the Wrath of the Lich King years), they changed it to use a 64-bit value, and the gold cap is now 1 copper shy of 1 million gold. That was an artificial limitation - there's no real reason why they couldn't just use the entire 64 bits if they wanted to - I don't think anyone would ever be able to reach the 2^63 (assuming a signed 64-bit integer) that it could store.

    --
    Intelligent responses welcome, flames will be met with marshmallows.
  43. Easy fixes by Peter+(Professor)+Fo · · Score: 1

    You are very unlikely to need millisecond precision when planning a year in the future. So fix one is to use a day-based counter such as Julian date.

    OK so we're over that problem but dates are NOT LINEAR. When did you start your current job? "June 2006" (note no day). When did you leave? "Not yet." In many applications we need Beginning-of-time, Not known, 1986, August 1986, 17 August 1986. Then we need rules for 'February 27th plus one month'. For the answers look at http://vulpeculox.net/day/index.htm . (Keen coders welcome.)

  44. 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

  45. I'm going to party like it's 1997-1999 by ReallyEvilCanine · · Score: 1
    I look forward to my impending forced retirement secure in the knowledge that I will be better qualified than most of the people older than me (who have died) and most of those younger (who spend time on reddit going on about %ThisWeek'sLanguageOfTheCentury%) when it comes time to slog through the shit I recoded 15 years ago as they told me that:
    • 1) time integers should indeed be signed because "fuck you, consistency"; and
    • 2) 32 bitses is enough for anyone
    1. Re:I'm going to party like it's 1997-1999 by geminidomino · · Score: 1

      While number 2 is certainly facepalm worthy, I'm not sure about 1. I don't think it's so much "fuck you, consistency" and more "fuck you, the world didn't come into being on 1970-01-01"

    2. Re:I'm going to party like it's 1997-1999 by adri · · Score: 1

      No, it's because of "fuck you, we may need to add positive and negative time_t values together to get a result, and boy do we not want things to be promoted to the wrong type over time."

  46. 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.
  47. It's not just the application code by Megane · · Score: 1

    I've got an embedded system using a commercial cross-compiler. I've tried setting the clock to around 2038 to see what happens. The date/time functions in the C library start to fail before the roll-over. (You can disable them in favor of your own, but it seems to be a pain in the ass.) I seem to recall it starts to have problems in 2036. This system controls lighting in small commercial buildings, so I hope they'll get to upgrade in 20 years or so. In any case, I felt it was safe to only use 2 digits in the clock setting screen as they'll probably be long gone by 2099.

    --
    #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
  48. 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
  49. The final days shall be known as by Tablizer · · Score: 1

    Unigeddon

  50. Re:64-bit computers DO NOT solve this problem by KevCo · · Score: 1

    2038 is so close to the singularity that the computers will most likely just fix it themselves.

  51. Re:32-bit signed integer? by larry+bagina · · Score: 1

    2147483647 (INT32_MAX) seconds / 60 /60 / 24 / 365 = ~68 years. 1970 + 68 = 3038. 1970 - 68 = 1902.

    --
    Do you even lift?

    These aren't the 'roids you're looking for.

  52. oh really? by slashmydots · · Score: 1

    "but those of us in the early parts of their careers will be the ones who have to deal with the problem."
    I'm 25 and we don't use Unix here. Those two statements are not unrelated. Yay, it doesn't affect us.

  53. Re:32-bit signed integer? by Cid+Highwind · · Score: 1

    Contrary to what the cultists of unsigned int(time_t) implementations might tell you, there was in fact time before 00:00:00 1 January 1970. Its vast (but often boring) history is chronicled in records made of ink symbols impressed on sheets of processed wood pulp bound in volumes known as "books".

    --
    0 1 - just my two bits
  54. 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.

  55. Re:64-bit computers DO NOT solve this problem by Anonymous Coward · · Score: 1

    You know what that phrase means, and he knows what that phrase means, but does his client know what that phrase means?

  56. I remember my intro to CS class... by xyourfacekillerx · · Score: 1

    I realized with horror this bug was to occur. The professor reassured me that by that time, mankind will have advanced so much that we will have replaced all the hardware and all the software in the world where this might be a problem. He said Unix itself probably will be replaced. He didn't mean that alternatives would be available, i.e. a different OS users COULD install, or different hardware users COULD use. He meant that man would have taken the effort, such that no person could go out in the world and find hardware/software where this would be a problem (except maybe a museum). I really, really don't see that happening. Maybe critical infrastructure like nuclear plants, military, power grid, water, etc. will fix the problem at great expense to the government, but no way will the rest of the world. And it's not mom and pop stores and small public libraries that will shut down. It's going to be a big problem for a lot of things that daily affect each of us.

    "We'll fix it later" should not really ever be the philosophy of any OS.

  57. Re:Come on! by WuphonsReach · · Score: 1

    I don't see why we'd need 128-bit time if we're counting seconds, considering that 64-bit time gets us up to 20 times the current age of the universe

    Moving to 128bits, you would definitely no longer count in seconds but probably in 1 millionth or 1 billionth of a second. Or even finer resolution then that (use the lower 64bits for sub-second resolution).

    --
    Wolde you bothe eate your cake, and have your cake?
  58. Never too early. by mory · · Score: 1

    And just who are you to tell me it's too early to panic? I'll panic when I want.

  59. Re:32-bit signed integer? by LiENUS · · Score: 1

    Why can't you have dates before jan 1st 1970?

  60. 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...

  61. Re:fake!!!! Nothing to see here. by water-and-sewer · · Score: 1

    How did a poster who didn't read the article get "Insightful"?

    Go read the article. You'll see screenshots of iOS 6.1 displaying weirdness, and a link to a Google Nexus 7 with issues too.

    So no, this is not just some Windows 8 whiner. Here's the link again. Click it this time!

    http://www.informationweek.com/byte/personal-tech/25-years-from-today-a-time-for-bugs/240146640

    --
    If this were Usenet, I'd killfile the lot of you.
  62. 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.

  63. Re:64-bit computers DO NOT solve this problem by quacking+duck · · Score: 1

    The story about the retired technician sending the company which demanding an itemized invoice, "fixing issue: $10; knowing how to fix it: $19,990" needs to be updated with an additional "Jumping through multiple levels of management CYA red tape" line item costing three times more.

  64. Re:PHP by geminidomino · · Score: 1

    Sure it does, at least on 5.3.10-1ubuntu3.4.

    It's unsigned integers it lacks, for whatever reason...

  65. Re:64-bit computers DO NOT solve this problem by gnasher719 · · Score: 1

    Based on the fact that this stopped being true a long while ago, yes, if the number is actualy big, I'd be amazed.

    If you look closely, he or she posted an expression where the result of a comparison was compared to 4. Comparisons produce a value of 0 or 1, so the result is never equal to 4, so the expression was always 0.

  66. 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.
  67. Call me out of retirement by williamyf · · Score: 1

    The summary says:

    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.

    I dealt with the Y2K issue in a Telco environment. When the problem is looming closer, take me out of retirement and offer to pay me a small fortune, and I may consider showing you young lings how it's done. ;-)

    --
    *** Suerte a todos y Feliz dia!
  68. Y2K was great by jbolden · · Score: 1

    Panic? Y2K was a time when a huge amount of investment to upgrade systems occurred. It was a surge for everyone in IT when all sorts of projects that hadn't been able to get funding were able to get funding. Oh for those older people, it gives a great chance to contract writing programs in languages or using techniques younger people don't know. Those old Assembly language, C, Paradox, FoxPro... skills will be back in vogue.

    Why panic?

  69. No problem! by drfuchs · · Score: 1

    And I just changed my compiler to make "char" be 32 bits, and then I recompiled a few libs and all my source code, and now all my programs automagically support Unicode!

  70. 2038... by jones_supa · · Score: 1

    Also known as The Year of Linux on Desktop...

  71. Preserve Prince's head Futurama-style by GodfatherofSoul · · Score: 1

    I don't want to have to listen to the bubblegum pop autotuned remake of 1999.

    --
    I swear to God...I swear to God! That is NOT how you treat your human!
  72. You programmers are doing it wrong by cellocgw · · Score: 1

    Quit trying to fix the software, or move everything to 64-bit tools. The answer is much simpler: Just declare The Second Coming, and make, say 2020 the new Year One. Now you won't even have to worry about Y2K for another two thousand (decimal) years!

    --
    https://app.box.com/WitthoftResume Code: https://github.com/cellocgw
  73. Canned goods by slazzy · · Score: 1

    Going to start buying them now.

    --
    Website Just Down For Me? Find out
  74. Why has linux still not fixed this? by WaffleMonster · · Score: 1

    This problem was fixed in windows compilers long long ago by making time_t 8 bytes instead of 4. If you had been doing something stupid which assumed 4-byte time_t you would have just fixed it and moved on already - end of story.

    In the linux world the only way to fix this seems to be to create a 64-bit binary rather than allow 32-bit binaries to be compiled with 8 byte time_t.

    This seems unecessarily dangerous to me. We don't have 25 years or anything close unless no app looks to the future to make calculations or schedule events, or deal with expiration of long term contracts, licenses..etc. Not everyone has 64-bit systems.

  75. Re:64-bit computers DO NOT solve this problem by camperdave · · Score: 1

    You'd be amazed how many people code depending on the fact that sizeof(long) == sizeof(int) == sizeof(void*) == sizeof(time_t) == 4

    Based on the fact that this stopped being true a long while ago, yes, if the number is actualy big, I'd be amazed.

    Was that ever true? I thought long=2*int always. Otherwise, what's the point of long?

    --
    When our name is on the back of your car, we're behind you all the way!
  76. 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.
  77. 4 cases, not one problem by Todd+Knarr · · Score: 1

    It really boils down to 4 individual problems:

    1. System. time_t needs to expand, probably to 64 bits to match the natural integer size on a 64-bit system. That may already have happened on some 64-bit OSes.

    2. Libraries. You'll need to get updated versions that handle the problem. How they do it's up to the vendor. The worst cases will be libraries that appear to work in YMD or Julian day numbers externally but use time_t internally, those need updating but it won't be obvious they do.

    3. Internal calculations in the code. Anything that works directly in YMD or JD shouldn't have a problem. Anything that deals with time_t will need checked to make sure it's 64-bit-clean, but that's a subset of checking all the math in your code to make sure it cleanly handles going to 64-bit integers. Spots where fixing this is hard should be uncommon.

    4. External formats. Ones that store times as YMD (probably in a string form) or JD (string or integer) shouldn't have a problem. Ones that store the time_t value itself as an integer converted to an ASCII string should only have a problem if there's not enough characters in the field to handle a larger number of digits, and even then only when the value hits 10 billion seconds from epoch. Ones where the actual 4-byte time_t binary value is stored are the ones that'll have problems, since there's no good fix there that doesn't involve changing the format to use a larger field with all the headaches that go along with that.

    Most of the code I'm responsible for falls into #3, making sure the arithmetic is all 64-bit-clean. There's a minority of database-code-related clean-up, but mostly the conversions there are within the database and it's the database vendor's problem (or it'll be the more generic problem of converting to another database and vendor). External storage and data formats are almost a non-issue, almost universally if they're concerned with dates they use a YMD string format and don't deal with time at all. Most of the places where there's an actual time value, eg. timestamp fields, it's a string of some sort.

    The biggest worry I have is with NTP, which uses 32-bit unsigned seconds since 1 Jan 1900 in the packets. It's so pervasive for setting time that it'll be a major source of headaches, but at the same time nothing except the NTP software itself is affected by the packet format and there's a nice version number at a fixed position at the start of the packet so I can think of several ways off-hand of dealing with the problem (if it hasn't already been dealt with).

    1. Re:4 cases, not one problem by viperidaenz · · Score: 1

      NTP isn't so bad. If the two systems are within 68 years, the rollover is supported. So it isn't really a problem until 2038 when system clocks reset to 1970, 68 years in the past.

  78. Re:64-bit computers DO NOT solve this problem by camperdave · · Score: 1

    It was the same with the shuttles. The code base was so huge and so critical that they didn't know what would happen if a shuttle's mission took it from one year to the next. So NASA always made sure that the entire shuttle fleet was on the ground during the year end period. The latest a shuttle launched was December 19th,

    --
    When our name is on the back of your car, we're behind you all the way!
  79. 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!
  80. Re:64-bit computers DO NOT solve this problem by jandrese · · Score: 1

    Hopefully anybody working with 30 year mortgages solved this problem 5 years ago...

    For the most part this isn't a big deal, except when it is. When you have to update every single database record because you encoded the time as a 32 bit integer instead of using the database's built-in timestamp format, well, you're hosed. Timestamps in protocols are also a problem, because changing the size of the timestamp means changing the protocol which means you'll have to retain backwards compatibility or update everybody at the same time. It's messy. Still, by the time 2038 rolls around, I will be surprised if this is still an issue.

    --

    I read the internet for the articles.
  81. Not a bug. by fahrbot-bot · · Score: 1

    Okay, I'm late to this thread, but it's not a bug, it's a design limitation.

    --
    It must have been something you assimilated. . . .
  82. Whatever else, we can all rest assured... by ArtFart · · Score: 1

    ...that Oracle will stall until the last minute to release any relevant fixes for Java.

  83. Re:64-bit computers DO NOT solve this problem by nedlohs · · Score: 1

    And that had nothing at all to do with the NASA staff wanting to get drunk on New Year's Eve. Just a happy coincidence, honestly.

  84. File formats by John+Bayko · · Score: 1

    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.

    1. 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.

  85. Epoch ecstasy by spaceyhackerlady · · Score: 1

    I'll be 77 in 2038, but expect to be very much alive and kicking.

    Closer to the time, I expect this to be much like Y2K: some genuine issues that will be quietly handled behind the scenes, irresponsible media reporting and nutcases being, well, nutcases. Like Y2K, it's not like we'll need to back out any changes.

    I did my own Y2K audit in 1998, while preparing to move across the country and deciding what to take with me. My VCR had several Y2K bugs: it would not accept a date after 31 December 1999, it rolled over from Friday 31 December 1999 to Monday 1 January "00", and when I tried to set a program to start recording the evening of 31 December 1999 and stop the morning of 1 January, it overflowed internal data structures (including tuner PLL settings) and required a cold reboot to recover its sanity.

    In my work we've had to deal with GPS week number rollovers, every 1023 weeks from 1 January 1980. It happened in 1999, and will happen again in 2019.

    ...laura

  86. Re:64-bit computers DO NOT solve this problem by Rich0 · · Score: 1

    Not sure, but the fact is that the 64-bit switch was handled differently on different OSes/compilers/etc. Bottom line is that if you really care exactly how large a particular type is you need to define it using something like uint32 or such.

  87. Sucks to be a C dev by viperidaenz · · Score: 1

    As soon as a signed 64bit value overflows in milliseconds since 1970, I'll start worrying in a few hundred million years.

  88. Re:64-bit computers DO NOT solve this problem by Darinbob · · Score: 1

    There should be a standard for external time representation, and I don't think time_t is it. Though defacto use that's the standard, it has problems. Systems already have multiple time domains internally. You almost always need something with better resolution than a second. Task scheduler times for instances, timeouts, etc. Even file storage dates today have a need for finer resolution than 1 second. So converting between time domains should not be a big deal and yet so many programmers avoid it or assume that time() is universal.

    So a signed 32-bit time may be fully appropriate in many instances, depending upon the domain and assuming that programmers don't misuse those times.

  89. Re:64-bit computers DO NOT solve this problem by Rob+Kaper · · Score: 1

    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.

    Neh. Overestimating that cheesburger at $4 currently, that would require a yearly inflation of over 24%.

  90. Re:64-bit computers DO NOT solve this problem by gravis777 · · Score: 1

    Someone has probably already said this (if so, sorry for the duplicate post)

    But...

    Time to start hiring C programmers out of college to get to work on that y2k38 bug before planes start falling out of the sky and missles start launching on their own.

  91. Re:64-bit computers DO NOT solve this problem by Zordak · · Score: 1

    There was nothing classified about this system.

    --

    Today's Sesame Street was brought to you by the number e.
  92. Digital Preservation by futhermocker · · Score: 1

    Coincidentally I wrote some stuff up today on that subject in a internal report about possible dangers in regard to digital preservation. Preserving digital stuff for the far future, in this case > 2038 poses a potential danger if you do not apply some early planning. Think emulators, migration and stuff. Digital Preservation is still in the pioneering phase, mostly driven by archives, libraries, universities and cultural heritage institutions. DP is not just storing data, it is far more than that! Free tip of the day: there is potentially a lot of money to be made on this particular subject since there are only a few companies around offering serious Digital Preservation services. And yes, I make a nice living doing DP, thank you mr. Bitrot!

    --
    KERNEL PANIC -SIGFAULT AT ADDRESS #51A54D07
  93. 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.
  94. Re:64-bit computers DO NOT solve this problem by fisted · · Score: 1

    The real problem is embedded, i dare say.

  95. Worked on this at Sun Microsystems (kinda)... by bessie · · Score: 1

    I was on contract at Sun for a bit, fixing one of their old Unix variants that was used by Bell or some other telecommunications company as the basis for a phone messaging system. It was going to start having problems in 2000 due to its time calculations (both in the kernel and in some apps), but they didn't think it would be around by 2038, so I was instructed to use 32-bit time_t for every time value in the system.

    I do suppose those systems will not exist in 2038, but who knows...?

  96. Re:64-bit computers DO NOT solve this problem by lingon · · Score: 1

    Was that ever true? I thought long=2*int always. Otherwise, what's the point of long?

    You are only guaranteed that sizeof(long) >= 32 bits and sizeof(int) >= 16, so it's perfectly valid to have sizeof(long) == sizeof(int). There is no data type guaranteed to be >= 2*sizeof(int) (a long long is >= 64 bits). This is all for crappy legacy reasons. If you don't believe me, wikipedia has a good list.

  97. Re:64-bit computers DO NOT solve this problem by fatphil · · Score: 1

    The protected-mode 386 era. MS, Borland, and Zortech had advanced far enough to give you the 32-bit integers that your registers could cope with, but were too frightened, for several reasons, to offer you a 64-bit long.

    --
    Also FatPhil on SoylentNews, id 863
  98. 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"?

  99. Re:I feel like the security guard in Austin Powers by lseltzer · · Score: 1

    RTFA The story was run on that day because it was exactly 25 years to the event.

  100. Well, since you mention it.... by dfenstrate · · Score: 1

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

    Why don't you check the delta on personal wealth before and after folks go into office and get back to me. It's worth checking out what kind of gigs they land after their elected official years, and what kind of favors they did for those very same companies whilst they held office.

    Direct bribes are illegal. Trading on insider information is NOT illegal for legislators. Landing sinecures at companies that benefited from your legislation isn't illegal either. Employing the family members of legislators in comfy jobs is also perfectly legal.

    --
    Alcohol, Tobacco and Firearms should be the name of a store, not a government agency.
  101. 2106 by MichaelSmith · · Score: 1
    1. Re:2106 by Greyfox · · Score: 1

      They're unsigned, so it's really 2^31.

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    2. Re:2106 by Greyfox · · Score: 1

      Er signed, I mean. ADD's acting up more than usual today.

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    3. Re:2106 by MichaelSmith · · Score: 1

      So change time_t to be unsigned and deal with the few cases where negative times were used.

    4. Re:2106 by Greyfox · · Score: 1

      But then all the C programmers will be dead, not just retiring!

      --

      I'm trying to teach myself to set people on fire with my mind... Is it hot in here?

    5. Re:2106 by MichaelSmith · · Score: 1

      I will be implemented in C long before then.

  102. The Enemy is Us by jasnw · · Score: 1

    The problem is software, and the people who write it (us), not the hardware. I first ran into the "short time" issue in the 1970s working with coded data that used one digit for the year. So, we had a roll-over problem between 1979 and 1980. I learned then to only use things like "seconds since some date" for internal calculations and use YYYYMMDD HHMMSS.xxxxx (or something similar) for all external date/times - to files, shipping to another system, etc. Yeah, that breaks at year 10,000, but I'll let someone else worry about that. Bottom line is that programmers have to think about everything that might break and what they might do to avoid it. Yes, I have costs of converting between external and internal representations, but with carefully tested (and used many times) routines for the conversion this is a problem my codes do not have. Other problems, yes, but not this one.

  103. Re:64-bit computers DO NOT solve this problem by jonadab · · Score: 1

    > Hopefully they are just a recompile away from being fixed.

    Have you ever tried to recompile a big pile of crusty, 25-year-old code that was only originally intended to be used for five years on one very specific platform and has not been recompiled since the last OS upgrade more than ten years ago?

    It's not unusual to get tens of thousands of compile-time errors.

    That's assuming nobody deleted the source code six years ago to make space on the old hard drive because the log file had never been rotated and all they knew was the hard drive was low on space and the source code was the only thing they were pretty sure they didn't need on a day-to-day basis.

    --
    Cut that out, or I will ship you to Norilsk in a box.
  104. Re:64-bit computers DO NOT solve this problem by jonadab · · Score: 1

    > You'd be amazed how many people code depending
    > on the fact that sizeof(long) == sizeof(int)

    C programmers, gah.

    Unless you are writing something _inherently_ very low-level, like a device driver or boot loader or kernel, there is NO legitimate excuse for starting a new programming project in C at this point. (Maintaining old code is legitimate, of course. Sometimes you have to work with what you've got. Eventually it'll all have to be rewritten, of course, but that takes time, and it can't all be done immediately. When I say there's no legitimate excuse for using C for anything high level, I'm talking about starting entirely new codebases.)

    In any decent, modern language, it does not matter how many bytes an integer is. You program under the assumption that you don't know or care whether an integer is four bytes or forty bytes. It's however many bytes it needs to be, based on considerations that are unknowable when you write the code, because they'll be determined at run time. What operating system will the program be running on? Who knows? Could be anything. Could well be something that isn't even written yet. What processor family is the program going to be run on? Who cares? Not me. If somebody wants to run the software on an ARM system, why should that bother me? I only care about the software. What will the display resolution be? Hah. Could be anything from a 120x120px wristwatch up to a 3200x1200 triple-monitor setup. The user will make the window whatever size they want it to be, and if it needs a scrollbar it'll have one. How much memory will be available? Impossible to say. If it starts running low, the user will hopefully get a warning from the OS, but that's none of the application's business. How big will the number that you're representing be? If you knew that when you wrote the software, you'd have used a constant instead of a variable. (Okay, yeah, enum types have knowable size at compile time. That's a special case. Most data types don't fit that mold.) How big does this buffer need to be, to hold what the user is going to type? Are you kidding me? The only reasonable answer for questions like that is "I don't know, and I don't care."

    It was different back in the stone age, when dinosaurs roamed the earth and men wore clothes made out of bear skins and drive sizes were measured in kilobytes or possibly megabytes and a system with one such drive was used by many people, all of whom were technical professionals and could reasonably be expected to read a manual. Back then, you could slip a sentence like "The foobaz string can be up to 255 characters long, including the terminating null character," and the people using the software might actually read that and know what it meant, at least potentially. But those days are gone, and they are not coming back.

    --
    Cut that out, or I will ship you to Norilsk in a box.
  105. Re:64-bit computers DO NOT solve this problem by Forever+Wondering · · Score: 1
    Linux has already solved the problem in the x32 port. The various time related types have already been switched to 64 bit in anticipation of this. This was/is a non-issue for 64 bit mode [because the time_t was a long which is 64 bits]. In x32, time_t-like types have already been defined as 64 bit entities (e.g. long long). Something similar is already being done for ports to other architectures. My guess is that all this anticipatory work will be 100% complete within 2-3 years max [if it hasn't been already]

    --

    This would not work for current i686 ports, but they will all be long gone. Here's why:
    - All x86 CPUs sold today are 64 bit. They can support x86 kernel/app mode.
    - All legacy systems currently in the field that have 32 bit only hardware will simply wear out and die.
    - The useful lifetime for hard disks is about 5 years. Most systems get replaced then.
    - But, even after trying to keep a system alive after 5 years by upgrading the disks, most systems (e.g. the motherboard) die after 10 years

    Since the software is being changed _now_ and we're talking 25 years until the problem shows up, this is a non-issue ...

    --
    Like a good neighbor, fsck is there ...
  106. Re:64-bit computers DO NOT solve this problem by Rufty · · Score: 1

    Recompile. And re-enter the data.

    --
    Red to red, black to black. Switch it on, but stand well back.
  107. http://xkcd.com/607/ by handcuff · · Score: 1

    I haven't seen anyone post the xkcd comic yet.

  108. 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
  109. Nonsense, it's 64 bit now by Casandro · · Score: 1

    That time_t is 64 bits now on modern machines, only 32 bit machines overflow soon...ish. And even when they overflow, there are simple patches.

    1. Re:Nonsense, it's 64 bit now by rubycodez · · Score: 1

      wrong, there is no patch, let alone a simple one.

      32 bit processors (and smaller) are in use in plenty of critical routers, switches and embedded systems that actually must know what time it is.

    2. Re:Nonsense, it's 64 bit now by Casandro · · Score: 1

      Well, those routers typically don't last longer than 5 years either because of obsolescence or hardware failure.
      And embedded systems which need to care about the time can easily be written in a way so they will work with "negative" times. So with a bit of care there won't be a problem.

  110. 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]
  111. Re:64-bit computers DO NOT solve this problem by bar-agent · · Score: 1

    The problem is not that an unsafe program might not be updated in the next 25 years.

    The problem is that an unsafe program might have to look into the future.

    --
    i'd hit it so hard, if you pulled me out you'd be the king of britain [bash.org]
  112. Re:64-bit computers DO NOT solve this problem by unixisc · · Score: 1

    The more important question here is - when any OS, be it Windows 7, Unix (BSD/Solaris), Linux goes 64-bit, don't they also adapt a 64-bit or 128-bit time structure? As it is, the problem in this story is described as a Unix only issue - I would guess that even Windows NT was not designed to end in 2038. But I wonder whether even any of the BSDs - FBSD, OBSD, NBSD - would have this problem, much less Linux? Were they built w/ 1970 as their starting year?

  113. Re:64-bit computers DO NOT solve this problem by tehcyder · · Score: 1

    Y2k was a boom for technology contractors such as myself. The years leading up to Y2k38 will be good too. Think of all the code that will need to be totally rewritten. I know, there is that faction of people that want to see technology undo itself, and the world end, but for those of us that live in reality... it'll be great. Honestly, I wish we had these kinds of crises more often.

    People with your attitude should be exterminated like rats.

    --
    To have a right to do a thing is not at all the same as to be right in doing it
  114. Re:64-bit computers DO NOT solve this problem by tehcyder · · Score: 1

    I changed something like 20 lines of Pascal code, which took me maybe a week or two

    U has mad coding skillz!

    --
    To have a right to do a thing is not at all the same as to be right in doing it
  115. Unix time rollover not a worry by hyperfine+transition · · Score: 1

    ... because we'll still be picking through the smoking ruins of the NTP-time rollover in 2036 :-)
     

  116. John Titor by Sir+Foxx · · Score: 1

    Didn't John Titor warn us about this?

    --
    "I don't which is worse, that everyone has a price, or that the price is always so low"--Hobbes
  117. Re:64-bit computers DO NOT solve this problem by Zoxed · · Score: 1

    Then my goal is to thwart your retirement plan. I will contract a low-wage programmer from a yet-to-be-determined developing country...

    Your plan-to-thwart contains a potential bug.
    If, say, the US and Chinese economies continue for the next 25 years on their current trajectories it is quite possible that the "low-wage programmer" you speak of will live in the US, and hence the GP may get your contract !

  118. Not really. by ThePhilips · · Score: 1

    Pretty much all platforms have the time_t as long - the type used to represent UNIX time. Pretty much all platforms are now 64bit and thus have 64bit long. And even some 32bit platforms have 64bit time_t. It was problem about 10 years ago - but now it doesn't exist anymore. And the problem was mostly in the compilers: lack of the 64bit integer data type support in 32bit mode.

    The only platform where I have seen problem with 64bit time was the HP-UX 11.11 and 11.23 (haven't tested the 11.31). Some functions are failing/hanging when passed time value larger than 2^31. I have also seen similar problems on AIX 5.3 - but IIRC AIX 6.1 has fixed it. But then, nobody cares about the HP-UX or AIX anymore. Linux, Solaris and BSD are OK for quite some time now.

    --
    All hope abandon ye who enter here.
  119. Non-problem that keeps burning idiots by prof_braino · · Score: 1

    The same thing happened when the variable for time on 16 bit systems rolled over in the late 80's. My boss told me to "fix it". I added a second word, with a 32-bit value, the problem was solved. For that system, it should be fine till A couple weeks later, word came out that big financial companies (TRW, etc) ignored the issue, and lost piles of $$$. The same fools that ignored the issue the first time around were the "experts" warning us of the 2k disaster that never happened. So simple to fix, so foolish to ignore.

  120. Glad I am using Windows. by TheSkepticalOptimist · · Score: 1

    Burn...wait.

    --
    I haven't thought of anything clever to put here, but then again most of you haven't either.
  121. Re:64-bit computers DO NOT solve this problem by petermgreen · · Score: 1

    On pretty much every 32-bit unix-like system int, long, void* and time_t are all 32 bit. The only exception i'm aware of is the new "x32 abi".

    On 32-bit windows int, long and void* are 32 bit. time_t is not considered a core system type but part of the C libraries (which on windows unlike unix like systems is not a core system library) so whether it is true depends on what compiler you are using. In visual studio 2005 the default size of time_t was changed from 32-bit to 64-bit.

    It should be possible to add 64-bit time_t support to a 32-bit unix like operating system by taking an approach similar to that used for large file support. I haven't heard of anyone actually trying to do it though and applications would still at best need to be recompiled with the define to enable the new "large time support" mode and at worst may require considerably more work.

    --
    note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register
  122. Re:64-bit computers DO NOT solve this problem by petermgreen · · Score: 1

    However this does have a downside especially for small planes.

    Ultimately it is simply not possible to reduce risk to zero and if we are going to do anything in life then we have to accept that risk (even risk to life) MUST be balanced against cost. Since red tape increases the cost of safety systems it further follows that to maximise safety for a given "safety budget" a balance is needed between ensuring that the safety systems are sufficiently safe and not driving up the cost so much that safety improvements (whether fitting a new safety system to an existing plane or moving to a newer safer plane entirely) simply get rejected completely

    For airlines the system seems to work pretty well. Even with the high cost imposed by safety compliance the new planes are a sufficient improvement in fuel efficiency and reliability to make buying them economically worthwhile. But for other types of flying afaict it is quite common to see decades old planes still in service either because newer planes are too expensive or because there is simply noone making a suitable plane anymore. For non-commerical flying it's also common to see homebuilt planes registered as "experimental". Does this combination of old planes and homebuilt planes really make flying in small planes safer than it would be if lighter regulations made new small planes more affordable and allowed a better choice of new small planes to be offered?

    --
    note: i'm known as plugwash most places but i screwd up registering that here somehow in the past and now can't register