Slashdot Mirror


Time's Up: 2^30 Seconds Since 1970

An anonymous reader writes: "In Software glitch brings Y2K deja vu, CNET points out a small wave of Y2K-like bugs may soon hit, though it gets the explanation wrong. It will soon be about 2^30 (1 billion, not 2 billion) seconds since 1970 (do the arithmetic). Systems that use only 29 bits of a word for unsigned/positive integers, or store time as seconds since 1970 in this format, may roll back to 1970. (Many systems that do not need full 32 bit integers may reserve some bits for other uses, such as boolean flags, or for type information to distinguish integers from booleans and pointers.)"

675 comments

  1. Yay! by jargoone · · Score: 5, Funny

    This is the biggest computer-related time event since Y2K, which begun on January 1, 19100!

  2. Some systems... by NightSpots · · Score: 4, Interesting

    And which systems are those?

    Any of the common architectures use 29 bits instead of 31?

    1. Re:Some systems... by Anonymous Coward · · Score: 0, Informative

      GNU/Linux prior to 2.2 series.

    2. Re:Some systems... by be-fan · · Score: 4, Informative

      On many dynamically typed languages (notably Lisp) some of the bits of an integer are used as 'tag bits' that distinguish integers from pointers from cons cells, etc. Some bits are also sometimes used to help out the GC.

      So maybe a Lisp Machine might have this problem? Of course, Lispers will tell you that they'd always have the sense to use a bignum :)

      --
      A deep unwavering belief is a sure sign you're missing something...
    3. Re:Some systems... by Anonymous Coward · · Score: 5, Insightful

      Well, they wouldn't just have the sense to use a bignum - they'd have the sense not to override the default behaviour of the damn language, which would be to go to bignum if necessary. It would take effort to write a declaration to actually deliberately override the behaviour, and would be A Seriously Stupid Thing To Do. Doesn't mean that somebody, somewhere wouldn't do it, of course, but it wouldn't be the "common case" that there would be a problem waiting to happen, like in C.

    4. Re:Some systems... by Anonymous Coward · · Score: 0

      uh, but what about the people that matter, the people with well paying jobs, the people that contribute to society, the people the use Excel?

    5. Re:Some systems... by __past__ · · Score: 4, Informative
      they'd have the sense not to override the default behaviour of the damn language, which would be to go to bignum if necessary. It would take effort to write a declaration to actually deliberately override the behaviour, and would be A Seriously Stupid Thing To Do. Doesn't mean that somebody, somewhere wouldn't do it, of course
      Indeed, someone did, sort of. Namely the implementors of the SBCL compiler (and they probably inherited it from CMUCL) who, generally, definitely do not qualify as stupid.
      "... and of course, CL transparently uses bignums when a numeric quantity exceeds the range of machine words, so we don't get overflow problems"
      * (decode-universal-time (+ (* 86400 365 50) (get-universal-time)))
      debugger invoked on condition of type TYPE-ERROR:
      The value 2635786389 is not of type (SIGNED-BYTE 32).

      This is because I didn't specify a timezone, so it asks unix for the default timezone and DST settings, and unix needs a time_t, which is 32 bits on this box.
      Dan Barlow, SBCL and the Y2038 problem

      So even if Lisp tends to not have overflow problems, Unix and C will come back and bite you if you give them a chance...
    6. Re:Some systems... by Anonymous Coward · · Score: 0

      Well, that is stupid (of unix and c, of course, as usual). But the post was about the 29/30/31-bit integer representation problem, not the Y2038 issue - the prior posters point I think was that even though lisps often use 29-bit ints on 32-bit archs, they transparently go to bignum, usually - so the representation does NOT cause the same problem it does on a 31-bit mainframe using some misbegotten demon language like Object COBOL.

    7. Re:Some systems... by Anonymous Coward · · Score: 0

      Not as far as I can tell. Can you back that up?

    8. Re:Some systems... by Anonymous Coward · · Score: 3, Funny

      People who use Excel on purpose need to be sterilized.

    9. Re:Some systems... by Anonymous Coward · · Score: 0

      If there are, they've probably obsoleted at around 1985 or so..

    10. Re:Some systems... by Anonymous Coward · · Score: 1

      1. Congratulations. They are on crack indeed.
      2. False
      3. WTF exactly is "GNU/Linux 2.2 series"

    11. Re:Some systems... by j-pimp · · Score: 0, Offtopic

      Ok lets get my I'm not astroturfing disclaimer out of the way. I'm typing this on a 700mhz iBook running Panther. MMy browser is FireBird. IE:Mac is not installed on my system. My spreadsheet of choice is gnumeric and I use Open Office for my word processing needs on Linux systems at home and Apple Works on my Mac. Now, minus the EULA of Excel and the platform it runs on, WTF is you major problem with it. While those are serious issues, there are a host of applications that have these same issues, and you appear to be singling out Excel people especially. I'd have to say that Excel is number 2 on the list of programs I'd like the source code for from MS. Access is number 1. No spreadsheet out their comes close in terms of programable extenibility and database integration. Sure your stuck with using VBA, but VBA lets you call DLLs and you can write those in any language, using free software compilers!!!

      Yes free software is important, yes open source is important. Yes doing anything to hurt the boys at redmond is important. However, your troll seems to attack Excel users in particular. Now, if you can explain why Excel users, and not Word or outLook users need to be sterlized, then go right ahead.

      --
      --- Justin Dearing http://www.justaprogrammer.net/ We're just programmers.
    12. Re:Some systems... by rickle · · Score: 0, Flamebait

      Probably MS systems... We just don't know when or where it will happen on those. One of the many disadvantages of non-opensource software. Do you feel lucky? I do, but not that lucky.

    13. Re:Some systems... by Anonymous Coward · · Score: 0
      My problem is with Excel (ab)users, not the program itself.

      I use Excel for test result documents, to display network utilization, and so on - but I've seen way too many people use it as a very bad database system. If I had my druthers trying to make a spreadsheet serve as a database would be a firing offense after an initial warning.

    14. Re:Some systems... by JamesOfTheDesert · · Score: 4, Funny
      Now, if you can explain why Excel users, and not Word or outLook users need to be sterlized, then go right ahead.

      Um, not to be quarrelsome or anything, but I'm not sure sure you'll find anyone here willing to make that distinction.

      Present company execpted, of course. :)

      --

      Java is the blue pill
      Choose the red pill
    15. Re:Some systems... by j-pimp · · Score: 0, Redundant

      Um, not to be quarrelsome or anything, but I'm not sure sure you'll find anyone here willing to make that distinction.
      I know. It was flame bait and I just wanted to post an educated rebuttal.

      --
      --- Justin Dearing http://www.justaprogrammer.net/ We're just programmers.
    16. Re:Some systems... by Piquan · · Score: 1

      So maybe a Lisp Machine might have this problem? Of course, Lispers will tell you that they'd always have the sense to use a bignum :)

      That's what Symbolics said.

    17. Re:Some systems... by Piquan · · Score: 4, Interesting

      So maybe a Lisp Machine might have this problem? Of course, Lispers will tell you that they'd always have the sense to use a bignum :)

      The Symbolics Lispms had wider words than PCs today. They used 36-bit words on the 3600s, with 4 bits of tag and 32 bits of data for numbers (or 8 bits of tag and 28 bits of data for pointers). They used 40-bit words on the Ivory, with 8 bits of tag and 32 bits of data for all types. So either way, the number is a 32-bit value. (This is why Lispms traditionally spec RAM in megawords, not megabytes.)

      That aside, like I mentioned in my other post, they said that all the date code is bignum-friendly anyway.

    18. Re:Some systems... by archeopterix · · Score: 1
      I use Excel for test result documents, to display network utilization, and so on - but I've seen way too many people use it as a very bad database system. If I had my druthers trying to make a spreadsheet serve as a database would be a firing offense after an initial warning.
      You can use Excel for that? I use it as teh Intarweb publishing system and it works great! See my homepage at http://moronhosting.com/moron/homepage.xls!!!!
    19. Re:Some systems... by Wolfrider · · Score: 1

      -Somehow I doubt that anyone has been running Tom's Root Boot continuously for this amount of time...

      --
      .
      == WolfriderV6 == I'm willing to admit that *I just might* be wrong... Are you??
    20. Re:Some systems... by fucksl4shd0t · · Score: 3, Funny

      It was flame bait and I just wanted to post an educated rebuttal.

      Translation:

      It was flame bait, and I got baited.
      --
      Like what I said? You might like my music
    21. Re:Some systems... by Richard_L_James · · Score: 1
      Present company execpted, of course. :)

      Yeah as your average single male slashdot reader is very unlikely to need to be sterlized!

    22. Re:Some systems... by jeremyp · · Score: 1

      NT based systems use a 64bit time stamp IIRC.

      Not open source != not documented

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    23. Re:Some systems... by Tony+Hoyle · · Score: 1, Troll

      WTF? Informative?

      Funny, maybe...

      Gotta get me some of that crack that the mods are smoking...

    24. Re:Some systems... by hesiod · · Score: 1

      > you horribly untidy sack of maggot infested bladders. i mean, jesus christ.

      Interesting mistake there... You said "horribly untidy sack of maggot infested bladders" but meant "Jesus Christ?" I understand it, but some consider being called "Jesus Christ" a good thing. Ah, the uneducated fools.

  3. OH NO! by elite+lamer · · Score: 5, Funny

    SOCIETY AS WE KNOW IT WILL COLLAPSE!!!! I have to get bottled water and batteries ready! This will be a complete disaster--just like Y2K!

    --
    Oops!
    1. Re:OH NO! by HillBilly · · Score: 5, Funny

      You forgot the plastic sheets and duct tape. Don't forget to seal yourself in an airtight room.

      --
      "Go into the hall of mirrors and have a bloody hard look at yourself" - HG Nelson
    2. Re:OH NO! by SpaceLifeForm · · Score: 0, Redundant

      No, plastic sheets are the more modern stuff (Y2k+2).
      Back in Y2k days, it was just duct tape and WD-40.

      --
      You are being MICROattacked, from various angles, in a SOFT manner.
    3. Re:OH NO! by Anonymous Coward · · Score: 0

      Luckily you still had the tape. I couldn't imagine what to do if the society suddenly collaped and I ran out of bondage gear.

    4. Re:OH NO! by kurosawdust · · Score: 5, Funny
      I have to get bottled water and batteries ready!

      Calm down, man! Look, society might collapse or it might not - either way, that's no reason to down some kind of odd suicide cocktail.

    5. Re:OH NO! by operagost · · Score: 5, Funny

      Duct tape and WD-40... sounds like a redneck toolbox. Duct tape makes things stick, WD-40 makes them come apart. What else do you need?

      --

      Gamingmuseum.com: Give your 3D accelerator a rest.
    6. Re:OH NO! by lightsaber1 · · Score: 2
      you're not George W. Bush are you?

      I swear, that guy...every time the U.S. economy looks as if it might start going again and get back on track, he decides to scare the shit out of his people...something wrong with that boy.

      That said, this might be a serious problem, but more likely not. It could actually be worse than Y2K since it didn't get as much focus and there could be some critical system chugging away somewhere and nobody knows about its troubles. But again, more likely not.

    7. Re:OH NO! by Fancia · · Score: 1

      Something *to* stick and/or make come apart? Actually, I suppose you could stick the WD-40 and make the duct-tape come apart...

      --

      Bít, zabít, jen proto, ze su liska!
    8. Re:OH NO! by janneH · · Score: 1

      What else to do you need? Things...

    9. Re:OH NO! by JanusFury · · Score: 4, Funny
      What else do you need?
      A girlfriend?
      --
      using namespace slashdot;
      troll::post();
    10. Re:OH NO! by Feztaa · · Score: 4, Funny

      Duct tape makes things stick, WD-40 makes them come apart. What else do you need?

      Ok, you asked for it :)

      The only two tools a handyman will ever need are duct tape and WD40. If it moves but it shouldn't, use the duct tape; if it doesn't move but it should, use the WD40.

    11. Re:OH NO! by lastfuture · · Score: 1

      Wait till people can travel in time... into years prior to 1970 ...with a time machine using a unix ...which sets its system clock to the current date...

      OH MY GOD! RUN!

      --
      it's not about mimicking reality, it's about believability
    12. Re:OH NO! by qw(name) · · Score: 1

      As a recovering redneck, I can tell you that no redneck toolbox is complete without "balin' whar". :-)

    13. Re:OH NO! by Anonymous Coward · · Score: 0

      This is a redneck we're talking about, any barnyard animal will do.

      Thems women-folk are t-rubble!

    14. Re:OH NO! by LordKronos · · Score: 2, Funny

      >Duct tape and WD-40...What else do you need?
      A girlfriend?


      What for? He's already got lubricant.

    15. Re:OH NO! by pokeyburro · · Score: 1

      This must be why the terrorist alert went to orange!

      --
      Lately democracy seems to be based on the skybox, the Happy Meal box, the X-box, and the idiot box.
    16. Re:OH NO! by Mad+Marlin · · Score: 1

      Wait till people can travel in time... into years prior to 1970 ...with a time machine using a unix ...which sets its system clock to the current date...

      OH MY GOD! RUN!

      Unix uses a signed 32-bit integer.
      Earliest possible date: Fri Dec 13 14:45:52 CST 1901.
      Latest possible date: Mon Jan 18 21:14:07 CST 2038.
      And anybody with a time machine would be able to afford a 64-bit computer.

    17. Re:OH NO! by new+death+barbie · · Score: 1

      Only a true geek would have bottled water that needs batteries...

      --

      It's supposed to be completely automatic, but actually you have to press this button.

    18. Re:OH NO! by lastfuture · · Score: 1

      > Unix uses a signed 32-bit integer.
      > Earliest possible date: Fri Dec 13 14:45:52 CST 1901.
      > Latest possible date: Mon Jan 18 21:14:07 CST 2038.

      ah ok i see. i assume time machines aren't invented until after 2038 anyway.

      --
      it's not about mimicking reality, it's about believability
    19. Re:OH NO! by Flwyd · · Score: 1

      Can I trade some WD-40 for one?

      --
      Ceci n'est pas une signature.
  4. so in other words.. by digital+bath · · Score: 3, Funny

    y2.003k?

    ...Run for the hills!

    --
    find / -name "*.sig" | xargs rm
    1. Re:so in other words.. by jargoone · · Score: 1

      Nah, more like "s1b".

    2. Re:so in other words.. by NeoThermic · · Score: 1

      Well, actualy, it would be y2.004k...

      2^30 seconds --> years + 1970 = 2004.0481298833079654997463216641

      Im just more worried about the 0.0481298833079654997463216641 seconds after 2004...

      NeoThermic

      --
      Use my link above, or to view my server, NeoThermic.com
    3. Re:so in other words.. by pjotrb123 · · Score: 1

      no, y2.004k!

      --
      I liked my next sig a lot better
    4. Re:so in other words.. by liamcaden · · Score: 1

      I would think it would be more like y2k4, but I could be wrong. :)

      --
      "The same thing we do every night, try to take over the world" -The Brain (Pinky&the Brian)
    5. Re:so in other words.. by Anonymous Coward · · Score: 0

      y1.957k.
      It's still 1024 for me no matter what SI says.

    6. Re:so in other words.. by optikSmoke · · Score: 4, Interesting

      Im just more worried about the 0.0481298833079654997463216641 seconds after 2004...

      Not to nitpick, but that would be 0.0481298833079654997463216641 years. And besides, your calculation is a little off because you appear to have used 365 days per year :).

      How 'bout this:

      2^30seconds / 60seconds/minute / 60minutes/hour / 24hours/day / 365.242199days/year = 34.025551925361years

      34.025551925361years + 1970 = 2004.0255519254

      0.0255519254years * 365.242199days/year = 9.3326414074074days

      0.3326414074074days * 24hours/day = 7.9833937777782hours

      0.9833937777782hours * 60minutes/hour = 59.003626666694

      0.003626666694minutes * 60seconds/minute = 0.21760000161308seconds

      OR, on January 9, 2004 at 07:59:00.21760000161308, the world will come to an end.

      Approximately.

    7. Re:so in other words.. by jrockway · · Score: 1

      or ut2k3 ... good stuff

      --
      My other car is first.
    8. Re:so in other words.. by SYSS+Mouse · · Score: 1

      I would like to remind you that 2004 is a leap year.

    9. Re:so in other words.. by Anonymous Coward · · Score: 4, Funny

      I love you. Seriously, and not the "I won't get it in your eye" type of love, this is the real thing.

    10. Re:so in other words.. by OwnedByTheMan · · Score: 2, Informative

      ...hence the use of "365.242199days/year" as opposed to 365.

    11. Re:so in other words.. by Pastis · · Score: 1

      is that supposed to be GMT time? ;)

    12. Re:so in other words.. by samhain_tm · · Score: 1

      But what time zone are we talking about here? GMT?

      --
      I'm the root of all that's evil, yeah, but you can call me cookie.
    13. Re:so in other words.. by Anonymous Coward · · Score: 0

      DateAdd("s", 2 ^ 30, #1/1/1970#) = #1/10/2004 1:37:04 PM#

    14. Re:so in other words.. by herc_mk2 · · Score: 1

      I agree: on 09 Jan 2004 date I will turn 40. Not sure about the time, better ask Mom.

      I am not making this up.

    15. Re:so in other words.. by HTH+NE1 · · Score: 2, Funny

      y1.957k.
      It's still 1024 for me no matter what SI says.


      Then go take a 1 km walk off a 1000 m pier.

      --
      Oh, say does that Star-Spangled Banner entwine / The myrtle of Venus with Bacchus's vine?
  5. Yeah well... by twoslice · · Score: 4, Funny

    My two-bit computer ran out of time the moment it was turned on...

    --

    From excellent karma to terible karma with a single +5 funny post...
    1. Re:Yeah well... by Roofus · · Score: 5, Funny

      You bought a Packard Bell too then huh?

    2. Re:Yeah well... by jpetts · · Score: 1

      My two-bit computer ran out of time the moment it was turned on...

      That's what you get for buying the one with the fast clock!

      --
      Call me old fashioned, but I like a dump to be as memorable as it is devastating - Bender
    3. Re:Yeah well... by Anonymous Coward · · Score: 0

      me too, w/3.1 from a dept. store

    4. Re:Yeah well... by Anonymous Coward · · Score: 0

      My venerable old PDP-8/E overflowed a long time ago...

    5. Re:Yeah well... by siskbc · · Score: 1

      I had myself a PB 486 SX-25. It was so pimp, I had to remove the hard drive so I could get the floppy drive out to replace that beautiful 5.25 with a CD-ROM. And nothing beat that 2400 modem. Yum.

      --

      -Looking for a job as a materials chemist or multivariat

    6. Re:Yeah well... by MyHair · · Score: 1

      No, that's the OS. It was time to upgrade to the next version, but unfortunately it's been delayed a few bits.

    7. Re:Yeah well... by Reece400 · · Score: 1

      I had a packard bell 486,, we velcro'd our CD-ROM drive on top :D,, worked suprisingly well..

      Reece,

    8. Re:Yeah well... by nathanh · · Score: 1
      My two-bit computer ran out of time the moment it was turned on...

      To be fair, if it had a whole 2 bits then it would have lasted a full 4 seconds before running out of time.

    9. Re:Yeah well... by Rubyflame · · Score: 1

      Not with signed integers.

      --

      All it takes is nukes and nerves.
    10. Re:Yeah well... by JimBobJoe · · Score: 1

      You bought a Packard Bell too then huh?

      Dude, you needed the one with the turbo button.

      It was big endian.

  6. subject by after · · Score: 1

    This seems interesting, but what systems do not use the FULL 32 bits to sore these numbers?

    I would bet that if those systems did malfunction because of this, it would not do tons of harm - and upgrading wouldn't cost a cent.

    1. Re:subject by after · · Score: 3, Informative

      If this is a problem, then developers should start making ``patches'' for the year 2038.

      Its interesting, how no one considered this would happen eventually and just started to use 64 bit ints to store this from the long run.

      Someday, we will hit a very high year, and these sort of problems will hit us as well ... all I hope is that my body gets frozen so I can see that year ;)

    2. Re:subject by Anonymous Coward · · Score: 1, Informative

      well, lisp implementations sometimes have funny sized small integer word sizes, like 29 or 31 bits. But the way lisp works, it's not an issue, since such small ints are considered just "hardware acceleration" of commonly used numbers - lisps just go to bignums (arbitrary sized, implemented in software) when you exceed the size possible for a "tagged unboxed" representation. A programmer would have to try REALLY HARD to make a lisp implementation fail in this way, and even then it would be immediately apparent since he'd have had to make a declaration to override lisp default behaviour.

    3. Re:subject by DarkOx · · Score: 3, Interesting

      People did think this would happen eventually, iff thoses systems were still in operation. Nobody thought they would be still in operation. So it was thought safe to save on the memory. Remember that lots of these big old mainframes that sometimes have hundreds of terminals have less then 16megs of memory. I think it was not till 1960 that a computer was even build with that much ram and and it was common into the late 70's to have much less on big iron. Disk/tape capacitys were just as limited. Memory was EXPENSIVE and LIMITED that is why it was done the way it was.

      --
      Repeal the 17th Amendment TODAY! Also Please Read http://www.gnu.org/philosophy/right-to-read.html
    4. Re:subject by after · · Score: 1

      I totally agree. But...

      If CPU/OS/Software designers doubled the, 16 bit (for example) variable that holds this number to, say, 32 bits - logically they would be doubling the amount of money needed for the memory.

      Mkay? So the cost is doubled ... but the maximum value that the variable can hold is exponentially multiplied.

      2^8 will hold a maximum of 256
      2^16 would 65536
      2^32 would 4294967296
      and finally 2^64 would hold a maximum of 18446744073709551616

      If a bit of memory costs $1 and someone used 64 bits ($64) instead of 32 bits ($32) - a double in value would be in place - they would get 4294967296 times more (18446744073709551616/4294967296) places to ++ that number.

    5. Re:subject by Anonymous Coward · · Score: 4, Interesting

      Yes, you are the first person ever to understand this.

      Try explaining to a manager, in 1978, why he should spend twice as much on a system so that it wouldn't fail sixty years hence.

    6. Re:subject by after · · Score: 1

      Good point. .. makes me feel pretty stupid.

    7. Re:subject by Anonymous Coward · · Score: 0

      That's all fine and dandy, except that here I am in 2003 with 256 megs of RAM and a shiny new Linux 2.6 kernel I just compiled today, and my time_t size is...

      32 bits.

      Which gives me a year 2038 overflow. What's more, to fix this overflow requires recompiling everything I have that uses time_t.

      A lot of systems have the year 2038 problem today and it would be annoying to fix. Can you imagine recompiling everything for some archiac system nearly 35 years from now?

    8. Re:subject by Anonymous Coward · · Score: 0

      Easy there... Let's not have a nervous breakdown!

      Isn't that really what life is all about? Making people feel stupid? I don't think so... At least I hope not.

      Slashdot, eh? Gotta love it.

    9. Re:subject by TheLink · · Score: 1

      "A lot of systems have the year 2038 problem today and it would be annoying to fix. Can you imagine recompiling everything for some archiac system nearly 35 years from now?"

      Actually, recompiling shouldn't be a big problem.

      Recompiling everything is no big deal to Gentoo and *BSD people.

      Identifying and rewriting vulnerable code is the problem.

      And the closed source stuff could be a bit messier.

      --
    10. Re:subject by quantum+bit · · Score: 2, Interesting

      Recompiling everything is no big deal to Gentoo and *BSD people.

      That's pretty much right. Just out of curiosity I tried recompiling everything on my FreeBSD system after changing the definition of time_t from int32_t to int64_t.

      Surprisingly, everything works. I guess this is probably because it's already sometimes compiled for 64-bit architectures anyway.

    11. Re:subject by Myen · · Score: 1

      What scares me is that the article states the bug "...goes back to release 20 (from 1997)." They didn't think they'd be around in 7 years?

      This is scary.

    12. Re:subject by Lemmeoutada+Collecti · · Score: 2, Insightful

      Aha, you see, it compiled. But have you tested every function and routine to make sure no programmer assumed a x bit integer? Or based calculations on the rollover shortcut? Or required a 32 bit integer for certain time calculations? Mere compilation is not enough to ensure accurate and correct operation of all programs.

      Personally, I would have more concerns about the stability of the recompiled system than the 32 bit time based one at this point.

      --

      You can have it fast, accurate, or pretty. Pick any 2.
    13. Re:subject by Cramer · · Score: 1

      That's all true. However, in this case, we have one company that did something stupid and now it's chewing on their ass. And they made their mistake in 1997 when there were already long standing standards for "infinity" -- namely MAX_INT (well, signed int anyway.) They blindly chose 2 billion. This was very likely just some random constant a programmer stuck in the code without thought or review. (I hate it when people do that.)

    14. Re:subject by quantum+bit · · Score: 1
      Mere compilation is not enough to ensure accurate and correct operation of all programs. Personally, I would have more concerns about the stability of the recompiled system than the 32 bit time based one at this point.

      That's exactly why I'm performing the test ;)

      So far, I've only come across problems in 3 software packages. One is a compiler written in its own language that needs to be re-bootstrapped (yuck). The other two are not due to assuming N-bit times, but rather in assuming that time_t is the same size as long int. These probably slipped by because it's true on 64-bit systems as well (both time_t and long are 64 bits), but on my system time_t is 64 while long is still 32. One of them (C++) produced a compile error, while the other (old K&R-style C) compiled without complaint but exhibited strange behavior at run-time.

    15. Re:subject by Lemmeoutada+Collecti · · Score: 1

      Are you posting the results of your testing anywhere? I'd be curious to see how well the various programs transfer...

      --

      You can have it fast, accurate, or pretty. Pick any 2.
  7. I thought we already rolled back to 1970's by Anonymous Coward · · Score: 5, Funny

    With some of the fashion's today (bell bottems, et al.)

    1. Re:I thought we already rolled back to 1970's by vidnet · · Score: 1
      With some of the fashion's today

      Uhm...this is slashdot. Few people would be able to describe their clothes without looking down, and none in terms other than colors and what thinkgeek printed on them.

    2. Re:I thought we already rolled back to 1970's by horati0 · · Score: 1

      "Now look how frickin' cool those guys from the Strokes are,
      Their riffs are three times as old as my jokes are!"
      --Triumph

      --
      The neutrality of this sig is disputed.
  8. yawn by Anonymous Coward · · Score: 5, Funny

    this has been a problem since 1970. is it news that c-net realizes it?

  9. RTFA by g-to-the-o-to-the-g · · Score: 3, Informative

    The bug effects older unix systems. So if your still using UnixWare, you may be in trouble.

    1. Re:RTFA by cbiffle · · Score: 4, Informative

      Okay, I read TFA. Wrong.

      The article specifically states that Unices use unsigned 32-bit values to store the number of seconds since 1970. Unfortunately, it's wrong even in that respect, since most Unices have been using larger timevals for some time now.

      It's fun to bash SCO and all, but come on.

    2. Re:RTFA by Anonymous Coward · · Score: 5, Funny

      So if your still using UnixWare, you may be in trouble.

      So that means Linux is affected also, since its mostly copied from Unixware, right?

    3. Re:RTFA by Anonymous Coward · · Score: 0

      affects! AFFECTS!!!

      "Effect" means "to cause"; "affect" means "to influence".

    4. Re:RTFA by oGMo · · Score: 4, Informative
      The article specifically states that Unices use unsigned 32-bit values to store the number of seconds since 1970. Unfortunately, it's wrong even in that respect, since most Unices have been using larger timevals for some time now.

      Actually, it's wrong in that POSIX states this value is signed, which is what causes it to be a problem we have to worry about before the next century. (If time_t was unsigned, various functions, such as time(2) could not return an error code. Similar deal happened with other types, such as size_t, which lead to the 2GB file problem for awhile.)

      --

      Don't think of it as a flame---it's more like an argument that does 3d6 fire damage

    5. Re:RTFA by Anonymous Coward · · Score: 4, Funny

      Thanks for you're advice, which I will follow from now on.

    6. Re:RTFA by drinkypoo · · Score: 2, Informative

      Also, UnixWare is a relatively new Unix featuring many newer concepts missing in SCO Unix, the actual product which geeks love to hate.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    7. Re:RTFA by Anonymous Coward · · Score: 0

      Most people using SCO Unix are already in trouble, what with imminent bankruptcy of SCO and all.

    8. Re:RTFA by Anonymous Coward · · Score: 0

      Not that it much matters, but were time_t unsigned, an error could still be signalled with -1; this would just be the largest value that a time_t could hold. That would reduce by one second the number of valid values a time_t could hold which isn't a huge deal.

      But then, with an unsigned time_t, we couldn't store values before 1970.. :)

    9. Re:RTFA by RedWizzard · · Score: 0, Offtopic

      A one line +5, and you included two of the most common grammer/spelling errors: effects instead of affects, and your instead of you're. Well done!

    10. Re:RTFA by Anonymous Coward · · Score: 0

      You assume they'll ever show infringing code...

    11. Re:RTFA by Anonymous Coward · · Score: 0

      You've only gone and done his lines for him - he'll cut and paste them and won't learn anything!

    12. Re:RTFA by Anonymous Coward · · Score: 0
      a lot of code might check if the value is < 1 rather than -1.

      I think it'd be easier to change time_t to be 64-bits and recompile than to try to find where a -value may be valid.

    13. Re:RTFA by Anonymous Coward · · Score: 0

      yeah, like an entire "linux kernel personality" that the rumour mill says includes illegally incorporated GPL code...

    14. Re:RTFA by Art+Tatum · · Score: 1

      If you're still using UnixWare, you're already in trouble. :-)

    15. Re:RTFA by zerblat · · Score: 0, Offtopic

      And you managed to spell "grammar" incorrectly...

      --
      Please alter my pants as fashion dictates.
    16. Re:RTFA by Blkdeath · · Score: 3, Funny
      And you managed to spell "grammar" incorrectly...

      It's a long-standing rule of Fight-O-Net / UselessNet / Slice'n'DiceDot that when one attempts to correct the grammer or speling of another, invariably they themselves will make a misteak.

      If for no other reason, of course, than the fact it doubles the fun of language police.

      --
      BD Phone Home!

      Shameless plug. Like you weren't expecting it.

    17. Re:RTFA by cpeterso · · Score: 2, Funny


      thank you Unix for combining data and error conditions into one convenient return value!

    18. Re:RTFA by oGMo · · Score: 1

      I agree... this is a result of a failing of C, in my view. Or, at least, a lack of proper sophistication. If C had a standard exception mechanism (and you could do it with longjmp, too), then a number of issues would be neatly wrapped up.

      Ah well, next OS, right? ;-)

      --

      Don't think of it as a flame---it's more like an argument that does 3d6 fire damage

    19. Re:RTFA by Theatetus · · Score: 3, Funny
      misteak

      mmmm.... misteak....

      --
      All's true that is mistrusted
    20. Re:RTFA by Anonymous Coward · · Score: 1, Informative

      Not a failure of C as such.. it could be avoided by using pointers instead of values and use the return value for success/failure reporting. It's all about the design.

    21. Re:RTFA by Anonymous Coward · · Score: 1, Funny

      Daryl?

    22. Re:RTFA by Anonymous Coward · · Score: 0

      Uh, no. 'Effect' means the result of some 'affection'.

    23. Re:RTFA by vadim_t · · Score: 1

      I think it'd be much nicer if the language could handle Perl-style returning of arrays. Example:

      ($status, $data) = function();

    24. Re:RTFA by Anonymous Coward · · Score: 0
      Check the size of your time_t:
      #include <time.h>
      #include <stdio.h>

      int main()
      {
      printf( "Your time_t is %i bits\n", sizeof(time_t)*8 );
      return 0;
      }
      Here on Linux 2.6/i386, it's 32. Internally, in the kernel, it's 64, but to bump it up in userland could break things.
    25. Re:RTFA by Anonymous Coward · · Score: 0

      There is a standard exception mechanism in POSIX, and that is provided by signals. Laugh if you will. The fathers of UNIX and POSIX were happy with themselves. And it isn't so bad. UNIX is worse is better design, remember. Anyway, I don't think the use of one value for return and error is necessarily a bad idea. 32 vs 31 bits is not a terribly large magnitude, you would have run into problems anyways.

    26. Re:RTFA by Anonymous Coward · · Score: 0

      (dotimes (x 10) (format t "~a. \"your\" should be \"you're\"~%" (+ 1 x)))

    27. Re:RTFA by Anonymous Coward · · Score: 0

      The 2GB file problem is not really from size_t. You could, in theory, write(2) more than 2 gigs and not be limited by the fact that the third arg is only 32 bits...

      write( fd, buf, ~0 ); // Writes 2 gigs
      write( fd, buf, ~0 ); // Writes another 2 gigs
      // Total is 4 gigs now.

      The real thing that limited files to 2GB would be stuff like offsets. (Like off_t)

    28. Re:RTFA by unitron · · Score: 2, Funny
      Uh, no. 'Effect' means the result of some 'affection'.

      I thought it was pregnancy that was the result of some 'affection'.

      --

      I see even classic Slashdot is now pretty much unusable on dial up anymore.

    29. Re:RTFA by RedWizzard · · Score: 1

      Typical. Should've used the preview button ...

    30. Re:RTFA by Anonymous Coward · · Score: 0

      Your welcome.

    31. Re:RTFA by Eccles · · Score: 1

      Indeed, google records me calling that "Bell's First Law of USENET" on May 15, 1990.

      --
      Ooh, a sarcasm detector. Oh, that's a real useful invention.
    32. Re:RTFA by quantum+bit · · Score: 2, Funny

      The first rule of Fight-O-Net is: You do not talk about Fight-O-Net.
      The second rule of Fight-O-Net is: You do not talk about Fight-O-Net.

    33. Re:RTFA by Anonymous Coward · · Score: 0

      size_t is actually unsigned.
      ssizt_t exists, if you want a signed size_t.

    34. Re:RTFA by Anonymous Coward · · Score: 0

      so i take it the greenhouse effect is the result of my love for baked beans eh?

    35. Re:RTFA by cornjchob · · Score: 1

      mmmm.... misteak....

      Isn't a cow a miss steak?

      [dodges tomatos]

      --
      We now have confirmed reports from an informed Orange County minister that Ethel is still an active communist.
    36. Re:RTFA by jeremyp · · Score: 1

      That would be "less than 0" wouldn't it?

      If you wrote a statement testing whether an *unsigned* value is less than 0, I would expect to see a compilation error.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    37. Re:RTFA by Longjmp · · Score: 1

      and you could do it with longjmp, too

      Pardon me?

      --
      There are fewer illiterates than people who can't read.
    38. Re:RTFA by Anonymous Coward · · Score: 0

      effects = "causes to be"

      You mean "affects". An easy way to remember that? Pretty much every non-pretentious sentence uses "affect". Things like "He effected a change in the system" are pretentious, IMHO, whereas normal usage is not. :)

    39. Re:RTFA by wiit_rabit · · Score: 1

      No quite ... One suite of software is already at risk. PTC Pro-Engineer will currently stop interprocess communication between modules at approx 1:00pm on Jan 11, 2004 No fix yet posted on their web site

    40. Re:RTFA by poot_rootbeer · · Score: 1

      If time_t was unsigned, various functions, such as time(2) could not return an error code.

      Additionally, you'd be unable to represent any date that occured BEFORE the epoch in 1970.

      So was I born in the year 1968, or the year 2020?

  10. Yeah, but most of us are fine... by Anonymous Coward · · Score: 1

    Until, what, 2032, when the 32 bit unix timestamp hits the wall.

    1. Re:Yeah, but most of us are fine... by strange_harlequin · · Score: 2, Funny

      Nah... no way will any of these systems still be in use in 30 years time...

    2. Re:Yeah, but most of us are fine... by dmobrien_2001 · · Score: 2, Informative

      Uh, you mean Tue Jan 19 03:14:08 GMT 2038, doncha?

    3. Re:Yeah, but most of us are fine... by shaitand · · Score: 1

      never done any work for the government have you?

    4. Re:Yeah, but most of us are fine... by Geek+of+Tech · · Score: 1
      >>>> Nah... no way will any of these systems still be in use in 30 years time...
      >> never done any work for the government have you?

      Oh! They've gotten around to using computers?! I didn't think that would be for another few decades. Amazing. Now if only they could get them all to work...

      And in other news, Al Gore has just appointed himself Czar of the Internet...

      --
      Stop the Slashdot effect! Don't read the articles!
    5. Re:Yeah, but most of us are fine... by shaitand · · Score: 1

      Yes, in fact I hear they have a 200 node beowulf cluster of TRS-80's and lots of $2000 terminals running off it.

  11. I don't think there are 31-bit architectures by lkaos · · Score: 4, Insightful

    I could of course be wrong but I'm pretty sure there aren't 31-bit architectures. At least, these architectures are exceedingly rare if they do indeed exist.

    What I believe this article is referring to is that some software may have been coded to use a bit in integers to store extra info. This seems like a pretty bad idea though as it would have all sorts of interesting effects on overflow and such. It would seem like it would only be useful to a very very very tiny portion of software since the overhead in using this method as a general purpose solution would be terribly difficult.

    Sounds like it's just the story of yet another software bug...

    --
    int func(int a);
    func((b += 3, b));
    1. Re:I don't think there are 31-bit architectures by the_2nd_coming · · Score: 1

      yeah...like car computers and stuff like that :-)

      --



      I am the Alpha and the Omega-3
    2. Re:I don't think there are 31-bit architectures by cbiffle · · Score: 5, Interesting

      Chances are pretty good that you interact with 31-bit machines every day -- namely, older (pre-64-bit) IBM mainframes. Even the new zSeries machines frequently run apps in 31-bit mode for compatibility with older systems.

      Using a couple of bits in an integer for data type is usually (in my experience) called 'tagged data.' I use it in Smalltalk VMs as an optimization -- the "objects" representing Integers are really just 31-bit integers with an extra zero-bit stuck on the LSB. (Object pointers have an LSB of 1, so you mask that to zero before using them and keep everything 16-bit aligned.)

      Essentially what you wind up with there is a tradeoff: you can perform simple arithmetic and logic on the Integer "references" without actually having to allocate an object to hold an Integer, but you lose a bit of dynamic range. In my experience, it's an acceptable tradeoff, and it lets you have all the advantages of a true OO system without the performance penalty of having to use an object for, say, every loop variable.

      So there's an example of why you do that. The aforementioned Smalltalk systems wouldn't be vulnerable to this date issue, however, as their integers will automatically convert themselves to arbitrary-precision numeric types as needed.

    3. Re:I don't think there are 31-bit architectures by Anonymous Coward · · Score: 5, Informative

      Linux 2.0.x and 2.2.x use 31-bit time_t struct's.

    4. Re:I don't think there are 31-bit architectures by Tom7 · · Score: 4, Informative

      It's not uncommon to use some extra bits for tags in implementations of some high-level languages. For instance, in SML/NJ the 'int' type is 31-bits long and signed; all integers are represented shifted up one bit and with a 1 in the new ones place. This is to distinguish them from pointers, which (since they are aligned) always end in two 0 bits. The arithmetic primops account for this extra bit, usually with very little overhead since the instructions are simple and can be paired. (Other SML compilers do it in different, sometimes better ways.) Anyway, fortunately they are not dumb enough to use 'int' to represent time, so there's no problem there! I expect there are lisp implementations that do similar things.

    5. Re:I don't think there are 31-bit architectures by boa · · Score: 5, Informative

      > I could of course be wrong but I'm pretty sure there aren't 31-bit architectures. At least, these architectures are exceedingly rare if they do indeed exist.

      Of course you're wrong :-)
      The IBM OS/390 and Z/OS operating systems, which run on most IBM mainframes, are both 31-bit.

    6. Re:I don't think there are 31-bit architectures by belarm314 · · Score: 2, Interesting
      Fortunately, it would be rather trivial to convert those to 32-bit structs in the next
      perl -e 'print ((2**31) - time)/(3600*24*365),"\n"'
      34.102266457382
      years.
      --
      When moderating, assume I have not yet had my coffee.
    7. Re:I don't think there are 31-bit architectures by pHDNgell · · Score: 2, Interesting

      I could of course be wrong but I'm pretty sure there aren't 31-bit architectures.

      Right, but that doesn't necessarily dictate how the 32 bits of 32-bit architectures should work. I ran into a problem in a programming system that used 30-bit numbers when I tried to represent time as an int. The programming system wanted two bits of the int for itself (or maybe it was just one and the sign, can't remember).

      --
      -- The world is watching America, and America is watching TV.
    8. Re:I don't think there are 31-bit architectures by (H)elix1 · · Score: 1

      I'm typing on a 31-bit version of SuSE s/390 Linux right now. Turns out they abstracted the OS from the hardware - not sure what is really running under the covers, but as far as the OS is concerned - I've only got 31 bits...

      http://www.suse.com/en/business/products/server/ sl es/s390.html

    9. Re:I don't think there are 31-bit architectures by lkaos · · Score: 3, Informative

      The IBM OS/390 and Z/OS operating systems, which run on most IBM mainframes, are both 31-bit.

      They're actually 32-bit platforms but only are addressable by 31 bits. I believe they do arthimetic on 32 bits...

      --
      int func(int a);
      func((b += 3, b));
    10. Re:I don't think there are 31-bit architectures by Jamie+Zawinski · · Score: 3, Interesting

      One of the fun tricks you can do is use the bottom 2 bits for tagged data type, and then reserve two of those for immediate integers: one for even ints, and one for odd. That way, you get 3 tag types, with 30 bits of pointer, but you still get 31 bit integers instead instead of 30 bit. So the tags might look like:

      • 00: odd int

      • 01: even int
        10: pointer to object header
        11: pointer to array/string header

      Then you convert raw data to an int with >>1, and to a pointer with &~3 (you only need 30 bits of pointer if all objects are word-aligned in a 32 bit address space.)

      Lucid Common Lisp used this kind of system, and Lucid Emacs/XEmacs do something similar.

    11. Re:I don't think there are 31-bit architectures by LinuxHam · · Score: 1

      Continuing for another replier, z/OS is a 64-bit OS with a 31-bit emulation mode.

      --
      Intelligent Life on Earth
    12. Re:I don't think there are 31-bit architectures by yoriknme · · Score: 1

      Ah. Now I understand that odd Java for Linux they produce.

    13. Re:I don't think there are 31-bit architectures by biobogonics · · Score: 1

      The IBM OS/390 and Z/OS operating systems, which run on most IBM mainframes, are both 31-bit.

      They're actually 32-bit platforms but only are addressable by 31 bits. I believe they do arthimetic on 32 bits...


      Yes, the IBM 360/370 series has always had 32 bit arithmetic, but a common "hack" on these systems was using 24 bit (perhaps now 31 bit) address mode instructions to do calculations, something like using LEA on the 80x86 series.

      Software rollovers cropped up on that hardware before Y2K, for example on MTS (Michigan Terminal System) see http://www.csl.sri.com/users/neumann/cal.html

    14. Re:I don't think there are 31-bit architectures by Performer+Guy · · Score: 1

      Correct, however someone might chose to implement with a signed int in which case you lose a bit of sign and only 31 bits to count positive seconds from epoch. So it's not a nasty hack or anything it could be something as trivial as supporting a feature with a signed vs unsigned type, and that could just be an omission leaving out "unsigned" in C code which many programmers do.

      This is all a non issue except for really old legacy unix systems. In all versions of contemporary Unix and Unix like OSs folks have been using 64bit types to count seconds for years now. That should keep us ticking for a few hundred billion years.

    15. Re:I don't think there are 31-bit architectures by twoshortplanks · · Score: 1
      You didn't actually run that code before posting did you ;-)?

      The brackets ((2**31) - time) are being considered the arguments to print, and then you're dividing the return value from print (which is, um, 1) by the seconds in a year and concatinating "\n", rather than dividing the result of the time calculation and then printing it.

      --
      -- Sorry, I can't think of anything funny to say here.
    16. Re:I don't think there are 31-bit architectures by richie2000 · · Score: 1
      You didn't actually run that code before posting did you ;-)?

      Wow, using Slashdot as a distributed AI debugger... Wonder if that's patented yet?

      --
      Money for nothing, pix for free
    17. Re:I don't think there are 31-bit architectures by The+Grassy+Knoll · · Score: 1

      You and I have different ideas when it comes to fun tricks...

      .

      --
      They will never know the simple pleasure of a monkey knife fight
    18. Re:I don't think there are 31-bit architectures by lkaos · · Score: 1

      It's 31-bit addressable but it still does 32-bit arthimetic. Check out some of the other responses in this thread...

      --
      int func(int a);
      func((b += 3, b));
  12. But Y2K hasn't even come yet... by Anonymous Coward · · Score: 5, Funny

    If 1K = 1024 then Y2K is 2048. We still have a ways to go on that one! :)

    1. Re:But Y2K hasn't even come yet... by nossid · · Score: 1

      Sorry, you are 4 years late to really annoy people with that one.

    2. Re:But Y2K hasn't even come yet... by Anonymous Coward · · Score: 0

      Wouldn't that be Y2Ki?

    3. Re:But Y2K hasn't even come yet... by Anonymous Coward · · Score: 2, Funny

      After consulting with marketing, the apocalypse has been moved up to 2K = 2000.

    4. Re:But Y2K hasn't even come yet... by Phroggy · · Score: 1

      Wouldn't that be Y2Ki?

      Precisely. Get with the new abbreviations, people!

      --
      $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
      $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
    5. Re:But Y2K hasn't even come yet... by Anonymous Coward · · Score: 0

      Hey, that's when my driving licence expires!

    6. Re:But Y2K hasn't even come yet... by ShecoDu · · Score: 1

      not to be pedantic... but...
      1K equals 1000
      1Ki equals 1024

    7. Re:But Y2K hasn't even come yet... by Anonymous Coward · · Score: 0
      not to be pedantic... but...
      1K equals 1000
      1Ki equals 1024

      I missed the Millebium?

  13. I fear to look... by Dreadlord · · Score: 4, Funny

    ...is 2.6 affected by the bug??

    --
    The IT section color scheme sucks.
    1. Re:I fear to look... by captaink · · Score: 1

      ..you have got to be kidding. I seriously doubt it.

      --
      --- If I were a fish, I'd be wet
    2. Re:I fear to look... by KrispyKringle · · Score: 1
      Um. Is this a joke? Did you RTFA?

      Why do I even bother?

    3. Re:I fear to look... by Dreadlord · · Score: 1

      well, duh, of course I'm kidding...

      --
      The IT section color scheme sucks.
    4. Re:I fear to look... by TheLink · · Score: 1

      Did you read his subject line?

      --
    5. Re:I fear to look... by Wolfrider · · Score: 1

      --Why should he have to be kidding? They never fixed it for the 2.4 kernel series, AFAIK.

      --
      .
      == WolfriderV6 == I'm willing to admit that *I just might* be wrong... Are you??
    6. Re:I fear to look... by AwesomeJT · · Score: 1

      Well, I don't think so. Linus doesn't work for Microsoft so I don't think he would allow such an oversight creep in to 2.6.0. Of course, if you're really worried, run a 64bit optiumized distribution (Fedora Core 2 should have native support for Atholon 64 and other x86-64 chips -- yummy).

      --
      SPAM solution made easy: 1 spammer, 5 cords of rope, 5 hourses, and fireworks. Be creative.
  14. Those nasty 30-bit integers... by bartwol · · Score: 1

    "Many systems that do not need full 32 bit integers may reserve some bits for other uses..."

    NOT!

    There are stories, there are non-stories, and finally, there are Slashdot stories.

    1. Re:Those nasty 30-bit integers... by Detritus · · Score: 1

      There are computers that use 30-bit integers, such as some old Univac systems. Just because you've never seen one, doesn't mean that they don't exist.

      --
      Mea navis aericumbens anguillis abundat
    2. Re:Those nasty 30-bit integers... by j.e.hahn · · Score: 1

      Yes, but because most of us have never seen them it probably means it's something most of us don't have to worry about.

      As for Univac... I can't believe there are too many of those still in operation. (Though I'm somewhat afraid to find out what they're running if they are in operation...)

    3. Re:Those nasty 30-bit integers... by Luigi30 · · Score: 1

      COMMODORE BASIC V1 4096 BYTES AVAILABLE
      READY.

      --
      503 Sig Unavailable

      The Signature could not be accessed. Please try again later or contact the administrator
    4. Re:Those nasty 30-bit integers... by Detritus · · Score: 1

      Nothing too important, just things like weapons control software for warships :-).

      --
      Mea navis aericumbens anguillis abundat
    5. Re:Those nasty 30-bit integers... by multipartmixed · · Score: 1

      > Nothing too important, just things like weapons control software for warships :-).

      Don't forget the spam relay systems!

      --

      Do daemons dream of electric sleep()?
  15. Cool, I'll be five years old again. by Anonymous Coward · · Score: 0

    This time I'll know all the answers on those darned school tests.

  16. How many seconds you have left: by dagg · · Score: 5, Informative

    perl -e 'print "seconds left: ", ((2**30) - time), "\n"'

    --
    Sex - Find It
    1. Re:How many seconds you have left: by Anonymous Coward · · Score: 0
      (Score:1, Troll)

      What kind of retard moderator would call this post a troll?

    2. Re:How many seconds you have left: by Anonymous Coward · · Score: 0

      wrap it in a once a second loop and make it a applet to replace the clock. i'd sure download it under GPL :)

      ~Eric
      bettse@onid.orst.edu

    3. Re:How many seconds you have left: by civilizedINTENSITY · · Score: 2, Funny

      bash-2.05b$ perl -e 'print "seconds left: ", ((2**30) - time), "\n"' seconds left: 1686570 bash-2.05b$ octave GNU Octave, version 2.1.44 (i586-mandrake-linux-gnu). Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 John W. Eaton. This is free software; see the source code for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'. Please contribute if you find this software useful. For more information, visit http://www.octave.org/help-wanted.html Report bugs to . octave:1> 1686570/60/60/24 ans = 19.520

    4. Re:How many seconds you have left: by Anonymous Coward · · Score: 0

      if you try to copy/paste in XWindows, you could accidenlty paste in 'rm -rf /' since XWindows doesn't copy/paste very well. That would make the post a troll.

    5. Re:How many seconds you have left: by Dahan · · Score: 4, Informative
      Isn't perl kinda big for that?

      $ echo seconds left: $(((1 << 30) - `date +%s`))

      (assuming your date(1) supports the %s extension)

    6. Re:How many seconds you have left: by Anonymous Coward · · Score: 0

      Please mod parent down. He should be checking against date, not time.

    7. Re:How many seconds you have left: by Anonymous Coward · · Score: 0

      That code assumes a bash shell.

    8. Re:How many seconds you have left: by Anonymous Coward · · Score: 0

      What the fuck is XWindows? Is it anything like X11?

    9. Re:How many seconds you have left: by Dahan · · Score: 2, Informative

      No, it assumes a POSIX shell.

    10. Re:How many seconds you have left: by Anonymous Coward · · Score: 0

      Hey moron, time() returns epoch seconds. That's what we want here.

    11. Re:How many seconds you have left: by Anonymous Coward · · Score: 1

      He means XWindowsP which is just Windows XP!

    12. Re:How many seconds you have left: by Anonymous Coward · · Score: 0

      How many years you have left, since no one really cares about seconds.

      perl -e 'print "years left: ", (((((2**30 - time) / 60) / 24 / 365))), "\n"'

    13. Re:How many seconds you have left: by naelurec · · Score: 2, Informative

      Hmm.. no... you forgot a /60 (60 minutes in an hour)

      so the correct answer would be ..

      ~0.0533 years ... which is ~19.45 days ..

    14. Re:How many seconds you have left: by Anonymous Coward · · Score: 0
      Isn't perl kinda big for that?

      On my systems, a freshly started perl process uses less memory than a bash process. I won't compare a Python or SBCL process, since that would just lead to flamage. (Besides, it's mostly fake memory anyhow.)

    15. Re:How many seconds you have left: by Anonymous Coward · · Score: 1, Informative

      You should use "localtime" as time will always return the seconds left since 1970.

      >perl -e 'print "seconds left: ", ((2**30) - time), "\n"'
      seconds left: 1681182

      >perl -e 'print "seconds left: ", ((2**30) - localtime), "\n"'
      seconds left: 1073741824

    16. Re:How many seconds you have left: by multipartmixed · · Score: 1

      > assuming your date(1) supports the %s extension

      And you're running bash or ksh.

      --

      Do daemons dream of electric sleep()?
    17. Re:How many seconds you have left: by Dahan · · Score: 3, Funny
      You don't find it unusual that no matter when you run your version that uses localtime, the answer is always 1073741824, which just happens to be 2**30?

      perl -we 'print "seconds left: ", ((2**30) - localtime), "\n"'
      Argument "Mon Dec 22 01:44:41 2003" isn't numeric in subtraction (-) at -e line 1.
      seconds left: 1073741824

      Not too Informative, if you ask me...

    18. Re:How many seconds you have left: by Wolfrider · · Score: 1

      From Linux 2.4.23 on a Pentium 233:

      $ perl -e 'print "seconds left: ", ((2**30) - time), "\n"'
      seconds left: 1658437

      --Kinda scary. (Falling down commences)

      Divided by 60:
      27640.6166666666666666666666666667 minutes (there are 86,400 secs per diem)

      Divided by 60 again:
      460.666666666666666666666666666667 hours

      Divided by 24:
      19.1944444444444444444444444444444 days

      --Oh, SHIT. Can somebody PLEASE double check me here??? I freely admit I suck at math...

      --
      .
      == WolfriderV6 == I'm willing to admit that *I just might* be wrong... Are you??
    19. Re:How many seconds you have left: by JCholewa · · Score: 1

      > > perl -e 'print "seconds left: ", ((2**30) - time), "\n"'
      > Isn't perl kinda big for that?
      > $ echo seconds left: $(((1 30) - `date +%s`))

      Rather shockingly, on my cygwin bash instance here, the perl method is faster than your alternative (roughly 0.155s versus 0.105s). This surprised me quite a bit.

      --
      -JC
      http://www.jc-news.com/

  17. OMG by Kludge · · Score: 5, Funny

    I was born just before 1970.
    I'm a billion seconds old.

    Holy shit.

    1. Re:OMG by tomstdenis · · Score: 1

      Just think how many nanoseconds that is!!!

      Tom

      --
      Someday, I'll have a real sig.
    2. Re:OMG by Kludge · · Score: 3, Funny

      That's 1 quintillion nanoseconds!

    3. Re:OMG by tomstdenis · · Score: 3, Funny

      That wasn't very polite. Take it back or we're not friends anymore.

      Tom

      --
      Someday, I'll have a real sig.
    4. Re:OMG by rampant+mac · · Score: 2, Funny
      Don't feel bad.

      It goes both ways.

      If your a Christian, you're, like, 15 minutes old.

      --
      I like big butts and I cannot lie.
    5. Re:OMG by Anonymous Coward · · Score: 1, Funny

      I'm a billion seconds old.

      Not any more...

    6. Re:OMG by Anonymous Coward · · Score: 0

      Sorry. I hadn't had my morning coffee yet and I was a bit cranky.

    7. Re:OMG by tomstdenis · · Score: 1

      Apology accepted.

      Tom

      --
      Someday, I'll have a real sig.
    8. Re:OMG by fucksl4shd0t · · Score: 4, Funny

      I was born just before 1970. I'm a billion seconds old.

      Worse yet, you're in your 30s. Sorry, dude.

      --
      Like what I said? You might like my music
    9. Re:OMG by Alioth · · Score: 1

      Ah, but in hexdecimal, he's in his early 20s!

    10. Re:OMG by Anonymous Coward · · Score: 0

      Yeah, and in a couple years he'll be that old guy with loads of cash who constantly scored with those goldigger chicks you lusted after in your early 20s.

      Poor him.

  18. Prepare for the Y10K Bug! by Anonymous Coward · · Score: 5, Funny

    How many of you programmers are storing your years using 4 digits? Yeah, that's what I thought, all of you. What happens when it's January 1, 10000? Hmmm? Yes, that's right, your software will fail. It will roll back to 0, which wasn't even a year!

    Now, I know what you're thinking. "There's no way someone will be using software I'm writing 8000 years from now." Yeah, and that's what programmers said 30 years ago about the year 2000. Be smart, and play it safe. Use a 5, or better yet, 10 digit year. What's a few bytes?

    1. Re:Prepare for the Y10K Bug! by calyxa · · Score: 1
      The Long Now

      -calyxa

      --
      Decay! Decay! Decay! -Helium
    2. Re:Prepare for the Y10K Bug! by Kirill+Lokshin · · Score: 1

      Well, there has already been a solution proposed in RFC 2550, so there's nothing to worry about. On the other hand, 8000 years from now, changes in hardware (not only the actual machines, but also infrastructure like the power grid, preventing legacy hardware from being used) would probably have made most of today's software inoperable anyways.

    3. Re:Prepare for the Y10K Bug! by ChaoticLimbs · · Score: 1

      OH MY GOD I forgot about that!
      Good thing I don't write programs that other people use!

    4. Re:Prepare for the Y10K Bug! by Trejkaz · · Score: 1

      If you're keen on storing a year as a separate integer you're fine anyway. 8 bits isn't enough even for 2003, and 16 bits is enough for 65,535.

      Of course you'd be nuts to store dates as text.

      --
      Karma: It's all a bunch of tree-huggin' hippy crap!
    5. Re:Prepare for the Y10K Bug! by Mr.+Slippery · · Score: 5, Insightful
      Be smart, and play it safe. Use a 5, or better yet, 10 digit year. What's a few bytes?
      I wrote the following in the RISKS forum a few years ago:
      So maybe I'm an April Fool, but it seems to me that the Y10K issue is worth a little serious thought.

      There are areas of human endeavor in which 8000 years is not an extreme time span. At present, we deal with these long time spans only in modeling things like geological and cosmological events. But it is not unreasonable that within the next century, we may begin to build very high technology systems with mission durations of thousands of years - for example, a system to contain radioactive wastes, or a probe to another star system.

      Y2K issues have raised our consciousness about timer overflows, but it's quite possible that this may fade in succeeding generations. There's no reason not to start setting standards now.

      Perhaps all time counters should be bignums?

      --
      Tom Swiss | the infamous tms | my blog
      You cannot wash away blood with blood
    6. Re:Prepare for the Y10K Bug! by be-fan · · Score: 1

      "On the other hand, 8000 years from now, changes in hardware (not only the actual machines, but also infrastructure like the power grid, preventing legacy hardware from being used) would probably have made most of today's software inoperable anyways."

      That's what you think, but its 2003 and we're still fscing using NTSC! In 10003, we'll still be using some varient of NTSC on our 10,000x10,000 UltraHDTVs, some 1970's-era software will still be running the TV stations, and US engineers will still be using fscking English units!

      --
      A deep unwavering belief is a sure sign you're missing something...
    7. Re:Prepare for the Y10K Bug! by Kohath · · Score: 5, Funny

      I don't know about you, but after 1/1/2000, I went back to using 2 digits.

    8. Re:Prepare for the Y10K Bug! by gulfan · · Score: 1

      It's a lot if you only have 640K

    9. Re:Prepare for the Y10K Bug! by axxackall · · Score: 1
      Of course you'd be nuts to store dates as text.

      In 3-5 ears since now, people will say something opposite:

      Of course you'd be nuts to store dates as binary rather than a text (as everyone else.

      What I learnt in Lisp (besides other things) - leave bits and bytes to assembly kernel/driver programming and to compiler programmers. Normal application programmer should work with symbols. Digits are no different then other text.

      Of course in 3-5 years the border will be pushed again and compilers usually will do logic optimization (instead of byte-compiling) of code for various VMS (virtual machines). Besides, with 10GHz 8xCPU 64GB-RAM typical home computers who cares about byte-optimization?

      --

      Less is more !
    10. Re:Prepare for the Y10K Bug! by iabervon · · Score: 1

      What are the chances that we'll still be using the Gregorian calendar in Y10K? Considering that we've only been using the current numbering of years for 1300 years and the Gregorian calendar for 250 years, it doesn't seem implausible that we'll change the calendar before 4-digit years run out.

      In fact, it's probably best to use something like a 64 bit number of seconds since the start of 1900, which will continue to work (with a different base) when the calendar changes, and should outlive the sun. Calculating how to display these times to people is pretty easy, and can be updated if necessary without messing up any stored data.

    11. Re:Prepare for the Y10K Bug! by Trejkaz · · Score: 1

      O...kay... but usually when the programmer types in "2000", it ends up as bits in memory anyway. Nobody wants to parse a date every pass of the data. That's exactly the same argument anti-XML zealots give for why XML is bad.

      And from what I saw of the Y2K bug, the problem wasn't that it was being stored in two character fields, but more that idiots were assuming results from certain function calls were limited to 99.

      --
      Karma: It's all a bunch of tree-huggin' hippy crap!
    12. Re:Prepare for the Y10K Bug! by balloonhead · · Score: 2, Funny
      You mean they'll be going for a pint after work?

      That's not a bad thing, unless you mean they'll be using those crazy american pints (12 Oz?) rather than proper wholesome British pints (16 Oz I think).

      --
      This idea was invented by Shampoo.
    13. Re:Prepare for the Y10K Bug! by the+eric+conspiracy · · Score: 2, Interesting

      What are the chances that we'll still be using the Gregorian calendar in Y10K?

      Don't know about the Gregorian calendar, but there are other calendars like the Chinese and Hebrew calendars that are already in year 4000+. These probably will be around for Y10K relative to their starting dates.

    14. Re:Prepare for the Y10K Bug! by DrSkwid · · Score: 1

      >Of course you'd be nuts to store dates as text.

      why? atoi is your friend

      It's called 'human readable text'

      It also removes endian problems for numbers stored in binary form across platforms.

      Think of the difference between user.dat and what regedit displays.

      That's why plan9 continued what Unix started and uses plain text for all configuration files.

      Binary config files are the devil's spawn.

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    15. Re:Prepare for the Y10K Bug! by Anonymous Coward · · Score: 0

      IMO, all statements regarding "all" anything should be banned. Can't Y2K be partially blamed on the idea that "all" clocks should assume the 20th century (19xx)?

      All timers should be designed based on needs -- not bignum blanket statements.

    16. Re:Prepare for the Y10K Bug! by AngryShroom · · Score: 1

      We are so technology bound to our current calendar systems it is very implausible that we will invent or adopt a new one.

      Unless there is a major disaster disrupting the entire planets ability to use current technology I doubt it will happen.

      The only other likely possibility is when(if) humans progress and expand to a point that a calendar system based on earth/moon/sun becomes irrelevant.

      --
      "The greatest tragedy in mankind's entire history may be the hijacking of morality by religion." - Arthur C. Clarke
    17. Re:Prepare for the Y10K Bug! by Anonymous Coward · · Score: 0
      And I bet in 10003 there will still be fscking fsckers who can't spell FUCK right because they still think "FSCK" is just soooooooooooooo damn witty. So fuck you and your lame "fsck".

      --

    18. Re:Prepare for the Y10K Bug! by Renegrade · · Score: 0

      Actually I just use my "OCT" library (eight 16-bit "words", combined into a single variable, 128-bits long) to handle situations like that.

      3.4028 x 10^38 ought to be enough seconds for anybody (10,790,283,070,806,014,188,970,529,154,990 non-leap-years)

      Let's see that's um ten thousand billion billion.. uh billion? non-leap-years. (365 day periods, each day being 86400 seconds)

      For shorter periods, I use just unsigned 32-bit based off of a 1-Jan-2000 00:00:00 epoch, with the zero value being reserved for an error. (This updates from my previous library which used 1990 as an epoch). That should take me to something like 2136, and gives me the handy fact that my time-equivalent function returns TRUE if it worked, and FALSE otherwise. (if(time(&Now)) ... )

    19. Re:Prepare for the Y10K Bug! by Trejkaz · · Score: 1

      Fair enough. Go ahead and store your entire SQL database as text. I guess it works for HypersonicSQL

      --
      Karma: It's all a bunch of tree-huggin' hippy crap!
    20. Re:Prepare for the Y10K Bug! by MrAngryForNoReason · · Score: 1

      But it is not unreasonable that within the next century, we may begin to build very high technology systems with mission durations of thousands of years - for example, a system to contain radioactive wastes, or a probe to another star system.

      Except that in the thousand years it takes to get there we will have developed a probe that can get there in 100 years, or 10, so we will have been their for hundreds of years by the time the original probe arrives. Dammit man go home and study your Hitchhiker's Guide.

    21. Re:Prepare for the Y10K Bug! by Jeremi · · Score: 1
      Bah, you amateurs... the only proper way to represent a date/time is as an unsigned long long, signifying microseconds-since-epoch.


      That format will work until the year 584,942AD, with microsecond accuracy.


      (To anyone who would complain about this wasting space, I encourage you to check out the current prices for 512MB SIMMs and 80GB Hard drives at your favorite on-line store)

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
    22. Re:Prepare for the Y10K Bug! by .com+b4+.storm · · Score: 1

      I don't know about you, but after 1/1/2000, I went back to using 2 digits.

      You mean after 1/1/1900, right? :)

      --
      "Wow, you're like some kind of superhero able to ward off happiness and success at every turn."
      -- Ryan Stiles
    23. Re:Prepare for the Y10K Bug! by bluGill · · Score: 1

      I did that in fact, and discovered that no amount of money will buy me more memory for my otherwise just fine computer. (ECC DIMMs or some such are required) They don't make it any more.

    24. Re:Prepare for the Y10K Bug! by damien_kane · · Score: 1

      You mean after 1/1/1900, right? :)

      Nope, he means 1/1/2000
      Any time I, for one, welcome our new history-erasing overlord.

      Plus, there's the added benefit of the 80's never happening... that's gotta be a plus for everyone involved...

    25. Re:Prepare for the Y10K Bug! by Just+Another+Perl+Ha · · Score: 2, Interesting
      Bzzzt... wrong answer. Here's how it works:
      1 UK fluid ounce -> 28.41 ml
      1 US fluid ounce -> 29.57 ml

      1 UK pint -> 20 UK oz -> 568.3 ml
      1 US pint -> 16 US oz -> 472.3 ml
      From the above, I'd hasten to guess that you're either not American, not British or not a connoisseur of fine pints after work.
    26. Re:Prepare for the Y10K Bug! by eric76 · · Score: 1

      I used to used my own date routines on the old PDP-11 and Vax computers. It stored the date in a 32 bit integer as the number of days since and including March 2, 1836 That is, March 2, 1836 was day 1, March 3, 1836 was day 2, ... .

      March 2, 1836 was the date that the Texas Declaration of Independence was signed in Washington-on-the-Brazos.

      At that time, the Alamo was under siege by Santa Anna's troops. It fell four days later on March 6, 1836.

    27. Re:Prepare for the Y10K Bug! by Anonymous Coward · · Score: 0
      People who say shit like this:

      Plus, there's the added benefit of the 80's never happening... that's gotta be a plus for everyone involved...

      obviously never lived through the 70's. Shudder.

    28. Re:Prepare for the Y10K Bug! by balloonhead · · Score: 1
      I am a brit, and I do like my beers, but my knowledge is limited to the fact that I was indignant when I was first served an American pint, and pleased when I got back home. The details (As you can see from my previous post) escape me... but i don't really care. I just like my pint to be the same size as I expect it, or suitably less expensive if it's smaller.

      --
      This idea was invented by Shampoo.
    29. Re:Prepare for the Y10K Bug! by Spoing · · Score: 1
      1. I don't know about you, but after 1/1/2000, I went back to using 2 digits.

      You're on my development team, aren't you?

      --
      A firewall can not protect you from yourself. Turn off what you do not need. Do not use the firewall to do your work.
    30. Re:Prepare for the Y10K Bug! by Trepalium · · Score: 1

      The downside being the 80s could happen again. :-(

      --
      I used up all my sick days, so I'm calling in dead.
    31. Re:Prepare for the Y10K Bug! by damien_kane · · Score: 1

      Qouth Denis Leary:

      Here we were, in the middle of a sexual revolution, wearing clothing that guaranteed we wouldn't get laid...

    32. Re:Prepare for the Y10K Bug! by Lairdsville · · Score: 1

      2 digits? HA, that was rather inefficient, I am using 1 digit. This time in 6 years I plan to be sailing around the world, spending the savings I made on that extra digit.

    33. Re:Prepare for the Y10K Bug! by Anonymous Coward · · Score: 0

      Of course you'd be nuts to store dates as binary rather than a text (as everyone else.

      What I learnt in Lisp (besides other things) - leave bits and bytes to assembly kernel/driver programming and to compiler programmers. Normal application programmer should work with symbols. Digits are no different then other text.


      Hang on there -- Lisp still stores those symbols as binary, not text. What you mean is that you'd be nuts to CARE whether it's stored as text or binary. You enter the dates as text and the system somehow remembers them to as many digits as you gave it.

      It just boils down to using a higher level language.

    34. Re:Prepare for the Y10K Bug! by quantum+bit · · Score: 2, Interesting

      Bah, you amateurs... the only proper way to represent a date/time is as an unsigned long long, signifying microseconds-since-epoch.

      What do you do when you need to represent a date before the epoch?

    35. Re:Prepare for the Y10K Bug! by JumperCable · · Score: 1

      Now, I know what you're thinking. "There's no way someone will be using software I'm writing 8000 years from now." Yeah, and that's what programmers said 30 years ago about the year 2000. Be smart, and play it safe. Use a 5, or better yet, 10 digit year. What's a few bytes?

      What are you CRAZY!?!?!?!

      Stick with the 4 digit year plan. It is humanity's only protection from the rise of the machines. After skynet becomes self aware; it will enslave humanity for the next 7800 years. But then comes the Y10K problem. *Poof* The computers go nuts & break down thus saving humanity. (It's kinda like the surprise salvation in War of the Worlds when the Martians suddenly die due to a common earth virus/bacteria.)

      For the moment we can still out run them. But scientist are foolishly teaching them to open doors and stand up on their own.

      I say we need to program back in a Y3k bug to prevent humans from being dominated by the machines. Arnold isn't going to come back from the future to save us. He's too busy trying to run California right now.

      Don't wear tin foil hats. It's a conspiracy by the government to get better reception to our brain waves.

    36. Re:Prepare for the Y10K Bug! by Anonymous Coward · · Score: 0

      Presumably if you discovered the physics necessary to care about time before epoch, you'd be able to fix the damn numbering system.

    37. Re:Prepare for the Y10K Bug! by Wolfrider · · Score: 1

      "When all else fails, ALTER THE DATA" -- Sign on one of my refrigerator magnets

      --
      .
      == WolfriderV6 == I'm willing to admit that *I just might* be wrong... Are you??
    38. Re:Prepare for the Y10K Bug! by fucksl4shd0t · · Score: 1

      What do you do when you need to represent a date before the epoch?

      Damn, mod this stuff up. Mostly because I was looking for the ideal post to post this same reply to when I found this. :)

      Anyway, anyone know how we currently represent historical dates before the epoch? Seriously! I suspect they're being stored as strings, therefore requiring some data conversions to use with modern dates, and something strikes me as being completely wrong with that...

      --
      Like what I said? You might like my music
    39. Re:Prepare for the Y10K Bug! by stridebird · · Score: 1
      Plus, there's the added benefit of the 80's never happening... that's gotta be a plus for everyone involved...

      Hmmm. Who was involved then? Just give me their names, just give me their names...

    40. Re:Prepare for the Y10K Bug! by DrSkwid · · Score: 1

      man join

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    41. Re:Prepare for the Y10K Bug! by Tarpan · · Score: 1
      its 32 bit signed.
      epoch:
      perl -e 'print gmtime(0)'
      Thu Jan 1 00:00:00 1970

      one second after:
      perl -e 'print gmtime(1)'
      Thu Jan 1 00:00:01 1970

      one second before
      perl -e 'print gmtime(-1)'
      Wed Dec 31 23:59:59 1969

      the second before the whole world explodes:
      perl -e 'print gmtime((1
      Tue Jan 19 03:14:07 2038
    42. Re:Prepare for the Y10K Bug! by Tarpan · · Score: 1
      Ahh crap, I suck. Hit the wrong button. that last should be:
      the second before the whole world explodes:
      perl -e 'print gmtime((1<<31)-1)."\n"'
      Tue Jan 19 03:14:07 2038
    43. Re:Prepare for the Y10K Bug! by Anonymous Coward · · Score: 0

      I'm more worried about Y-hammer40K.

    44. Re:Prepare for the Y10K Bug! by Pionar · · Score: 1

      We'll probably be using a different calendar in 8000 years.

    45. Re:Prepare for the Y10K Bug! by damien_kane · · Score: 1

      Well, Kohath for one.
      He's the one who effectively erased the 1900's by switching back to 2 digit dates.
      He must have had a good reason.

      Step 1. Erase century containing industrial revolution
      Step 2. ???
      Step 3. Profit!!!

    46. Re:Prepare for the Y10K Bug! by malaire · · Score: 1
      Don't worry - Y10K Bug has been solved already.

      It has been solved already by RFC 2550.

      It pays to be update with current standards like RFCs. This standard (RFC 2550) has been made specifically for the reason that there can be no more date-bugs in the future.

    47. Re:Prepare for the Y10K Bug! by Anonymous Coward · · Score: 0

      You appear to be laboring under the misapprehension that the epoch was the Big Bang. It actually took place in 1970.

      The epoch, that is, not the Big Bang.

    48. Re:Prepare for the Y10K Bug! by ShecoDu · · Score: 1

      why dont we store the year in a separate integer?

      struct date {
      char str[11];
      int year;
      }

      str would contain "MMddhhmmss" and the year is stored in a big enough memory space, it might be slower and harder to use, but it's a solution.

      just a thought.

    49. Re:Prepare for the Y10K Bug! by greenhide · · Score: 1

      The world doesn't explode.

      Time stops.

      At least, it does on a mac:

      ctime(2147483641)=Tue Jan 19 03:14:01 2038
      ctime(2147483642)=Tue Jan 19 03:14:02 2038
      ctime(2147483643)=Tue Jan 19 03:14:03 2038
      ctime(2147483644)=Tue Jan 19 03:14:04 2038
      ctime(2147483645)=Tue Jan 19 03:14:05 2038
      ctime(2147483646)=Tue Jan 19 03:14:06 2038
      ctime(2147483647)=Tue Jan 19 03:14:07 2038
      ctime(2147483648)=Tue Jan 19 03:14:07 2038
      ctime(2147483649)=Tue Jan 19 03:14:07 2038
      ctime(2147483650)=Tue Jan 19 03:14:07 2038
      ctime(2147483651)=Tue Jan 19 03:14:07 2038
      ctime(2147483652)=Tue Jan 19 03:14:07 2038
      ctime(2147483653)=Tue Jan 19 03:14:07 2038

      This means that, barring any unfortunate mishaps between now and 2038, I will live forever and never grow older!!!

      Unfortunately, I will be 61. So, no babes.

      --
      Karma: Chevy Kavalierma.
    50. Re:Prepare for the Y10K Bug! by Dirtside · · Score: 1
      IMO, all statements regarding "all" anything should be banned.
      So that would include your statement, which regards all statements that regard "all" anything...
      --
      "Destroy science and religion. Science would re-emerge exactly the same; but not religion." - Penn Jillette, paraphrased
    51. Re:Prepare for the Y10K Bug! by Anonymous Coward · · Score: 0

      Slashdot: explaining jokes since 1997

    52. Re:Prepare for the Y10K Bug! by Ben+Hutchings · · Score: 1

      Have you tried looking on eBay?

    53. Re:Prepare for the Y10K Bug! by Ben+Hutchings · · Score: 1

      atoi is not your friend. Its behaviour when given invalid or out-of-range input is undefined. What you really want is strtoul.

    54. Re:Prepare for the Y10K Bug! by UncleFluffy · · Score: 1

      I did that in fact, and discovered that no amount of money will buy me more memory for my otherwise just fine computer. (ECC DIMMs or some such are required)



      Try 1-800-4-memory. I got a whole bunch of ECC DIMMs for my quad (P2) Xeon box from them a while back. There's a cheapo clearance section too.

      --

      What would Lemmy do?

    55. Re:Prepare for the Y10K Bug! by Jeremi · · Score: 1
      What do you do when you need to represent a date before the epoch?


      Well, one obvious way to handle it would be to use 64-bit signed integers instead... you'll only get 290,000 or so years into the future with those, but you'll get 290,000 or so years into the past as well... (or alternatively, define "the epoch" to be any date in the far-enough-distance past that you prefer to use)

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
    56. Re:Prepare for the Y10K Bug! by DrSkwid · · Score: 1

      Welcome to my world

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    57. Re:Prepare for the Y10K Bug! by p3d0 · · Score: 1
      Be smart, and play it safe. Use a 5, or better yet, 10 digit year. What's a few bytes?
      I know you're joking, but the way to play it smart is not to push the fall-down-dead date further into the future. The way to play it smart is with a proper Date abstraction. Then, 8000 years from now, all someone needs to do is recompile your code with a larger Date type and it will keep on running.

      The central problem of Y2K is that a year is not a 2-digit number, nor a 4-digit number, nor any other number. It is a year. If you happen to store it as a 4-digit number, that's fine, but don't spread that assumption all over your code.

      --
      Patrick Doyle
      I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
    58. Re:Prepare for the Y10K Bug! by Tarpan · · Score: 1

      Mine (Linux) wraps:

      perl -e '$a=2147483641;for($i=0;$i<15;$i++){ print $a+$i."=".gmtime($a+$i)."\n" };'
      2147483641=Tue Jan 19 03:14:01 2038
      2147483642=Tue Jan 19 03:14:02 2038
      2147483643=Tue Jan 19 03:14:03 2038
      2147483644=Tue Jan 19 03:14:04 2038
      2147483645=Tue Jan 19 03:14:05 2038
      2147483646=Tue Jan 19 03:14:06 2038
      2147483647=Tue Jan 19 03:14:07 2038
      2147483648=Fri Dec 13 20:45:52 1901
      2147483649=Fri Dec 13 20:45:53 1901
      2147483650=Fri Dec 13 20:45:54 1901
      2147483651=Fri Dec 13 20:45:55 1901
      2147483652=Fri Dec 13 20:45:56 1901
      2147483653=Fri Dec 13 20:45:57 1901
      2147483654=Fri Dec 13 20:45:58 1901
      2147483655=Fri Dec 13 20:45:59 1901

      which will make me about -77 years old ;)

  19. deja vu? by fatgraham · · Score: 5, Funny

    IIRC, bugger all went wrong. No nuclear weapons randomly fired off in any direction, no computers melted (well, none of mine)

    1. Re:deja vu? by Anonymous Coward · · Score: 0

      Well, Bush got elected.

    2. Re:deja vu? by Anonymous Coward · · Score: 0

      They did, but everyone put it down to Bush stupidness.

    3. Re:deja vu? by zsau · · Score: 1

      Yeah, but only because the relevant computers ran on UNIX, so used UNIX time and didn't even know it was the year 2000. Now that we're coming up to 2^30, they'll all go busurk and your nuclear weapons will fire off in any direction. Though not at random.

      --
      Look out!
    4. Re:deja vu? by lildogie · · Score: 1

      Sadly, our Apollos (which are living on cannibalized parts) didn't die.

      Y2K death would've been the perfect excuse to pry cold, dead fingers from them.

    5. Re:deja vu? by dustmite · · Score: 1

      True, bugger-all went wrong, but remember, billions of dollars were spent upgrading millions of systems that were genuinely affected by the y2k bug (including computer systems in nuclear power plants, and those controlling electricity supply grids). Surely one must acknowledge that this might have been at least part of the reason that there were no major catastrophes?

  20. Y2K by KrispyKringle · · Score: 4, Funny
    I remember this. Talk about hype. I stumbled across a preparedness website a year or two later (one like this) and laughed my ass off. Talk about a throwback to 1999 (notice the animated gifs and scolling text in the status-bar that lend a real air of authority). I think I even e-mailed the writer and asked if he did't feel stupid now.

    There was no reply, though. His computer probably thought my letter was from a century ago.

    1. Re:Y2K by Anonymous Coward · · Score: 2, Insightful

      If people hadn't worked to prepare for Y2K, it wouldn't have gone smoothly. There was a problem but it was largely fixed before it happened.

    2. Re:Y2K by Anonymous Coward · · Score: 0

      If you hadn't posted anon, you'd have been modded up.

    3. Re:Y2K by Anonymous Coward · · Score: 0

      Take a look at the bottom of the page: "Last Modified: 01-DEC-99". Must have been his final update before he locked himself in his bunker.

    4. Re:Y2K by Anonymous Coward · · Score: 0
      The best part is that he says this:
      The auto industry, interestingly enough, is the only industry who seems to have made all of their products y2k compliant right from the start.

      When in the response Ford wrote him, they say this:
      The microprocessors involved with the
      performance of your vehicle do not use calendar-related functions and, therefore, will not be affected by the so-called "Year 2000 Bug".

      In other words, its not that the amazing auto industry is all prepared its that, despite what he thinks, the millions of embedded microcontrollers out there had NO PROBLEM form Y2k.
    5. Re:Y2K by KrispyKringle · · Score: 1

      Yes, and I'm sure that his hoarding water and ammunition, and warning that the Day of Reconing is upon us, really did a lot to spur all those programmers into action. Right.

    6. Re:Y2K by InnovativeCX · · Score: 2, Funny

      Just for kicks, I decided to run the tool linked on that site. Turns out I'm in for some trouble (?).
      Output from my Windows notebook:

      Microsoft Windows XP [Version 5.1.2600]
      (C) Copyright 1985-2001 Microsoft Corp.

      C:\Documents and Settings\Scott>"C:\Documents and Settings\Scott\Desktop\y2k.exe "
      Y2K by Harlend Computer Services . Copyright (C) 1998-1999.

      This copy of Y2K has NOT been registered for installation.

      Checking your Windows configuration ...

      Testing the O/S clock ...
      Failed

      Testing the BIOS clock ...

      Good news! The BIOS in this PC will roll over properly into the
      New Millennium, and correctly recognises 2000 as a leap year.


      It seems that though this system, made in 2001 is just fine. Windows XP, with a service pack from just a few months ago, is still not Y2K compliant. Maybe this is the reason GoLive keeps crashing and my popcorn does not fully pop.
    7. Re:Y2K by jondaman21 · · Score: 0

      Of course he didn't reply... he's still in his bomb shelter...

    8. Re:Y2K by budhaboy · · Score: 0

      poor guy. his list of other doom dates doesn't mention this one. I hope he's alright.

    9. Re:Y2K by eric777 · · Score: 1
      Great link!

      Did you notice the text at the bottom of the page?

      Last Modified: 01-DEC-99

      Physician, heal thyself! :-)

    10. Re:Y2K by pragma_x · · Score: 1

      Definately a throwback from '99 (this is right after webpages began crawling out of the primordial soup that was the internet at the time). I think the page meta-tags speak for themselves:

      <META NAME="GENERATOR" CONTENT="Mozilla/3.0Gold (Win95; I) [Netscape]">

  21. No sympathy for these guys by lurker412 · · Score: 3, Informative

    The program in question was revised in 1997. Most companies already had kicked off their Y2K programs by then. The popular press was already starting to run end of the world warnings. OK, so it wasn't a Y2K problem as such, but how this company managed to ignore the problem at that time is truly baffling.

  22. Oooohhh... by Anonymous Coward · · Score: 0

    So this is why John Titor traveled back in time!

    John Titor

  23. 31 bit architecture is very common by rdunnell · · Score: 3, Informative

    in mainframes and other "big iron" in finance shops.

    1. Re:31 bit architecture is very common by lkaos · · Score: 1

      Do you have examples?

      36 bit architectures are common. Of the mainframes I know of none are 31 bits...

      --
      int func(int a);
      func((b += 3, b));
    2. Re:31 bit architecture is very common by Meowing · · Score: 2, Informative
      36 bit architectures are common. Of the mainframes I know of none are 31 bits...

      36 bits was fairly common once upon a time, but no longer. Unisys still have a 36-bit series, but they're the last of the breed. See here.

      Big scary IBM boxes are where you see the 31 bit weirdness.

    3. Re:31 bit architecture is very common by Rick.C · · Score: 1
      in mainframes and other "big iron" in finance shops

      IBM mainframes have used 32-bit architecture since the mid-60s. For many years they only used 24 of those 32 bits for addressing, so the high-order byte was often used for other things.

      A decade or so ago IBM introduced 31-bit addressing (still using the same 32-bit registers and 32-bit storage "words") and used the high-order bit to indicate whether the address was a 24-bit or 31-bit value. Many people might misinterpret that as a 31-bit architecture when it's really 32-bit.

      The newer zSeries mainframes are 64-bit with downward compatibility with 31-bit and 24-bit addressing modes.

      --
      You were 80% angel, 10% demon. The rest was hard to explain. - Over The Rhine
      "Math in a song is good."-Linford
  24. Did the math. by Yaztromo · · Score: 4, Informative

    Okay -- I did the math, and 2^29 seconds since January 1st 1970 would have been up on January 4th, 1987.

    2^30 seconds since the epoch puts us into January 9th, 2004.

    Yaz.

    1. Re:Did the math. by happyduckworks · · Score: 5, Interesting

      > Okay -- I did the math, and 2^29 seconds since January 1st 1970 would have been up on January 4th, 1987. I remember that day - the Common Lisp system I was using (on a Sun) all of a sudden stopped recognizing when files were out of date and needed recompiling. Yup, they used a couple bits for a tag and then interpreted the rest as signed...

  25. Looks like they've got 19 days by rubypossum · · Score: 1

    They've got about 19 days by my system clock.

    jonathan@perl:~/dev/interface/lib$ perl -le 'print time();'
    1072051517
    jonathan@perl:~/dev/interface/lib$ perl -le 'print 2 ** 30;'
    1073741824
    jonathan@perl:~/dev/interface/lib$ perl -le 'print 2 ** 30 - time();'
    1690288
    jonathan@perl:~/dev/interface/lib$ perl -le 'print 1690288 / 60;'
    28171.4666666667
    jonathan@perl:~/dev/interface/lib$ perl -le 'print 1690288 / 60 / 60;'
    469.524444444444
    jonathan@perl:~/dev/interface/lib$ perl -le 'print 1690288 / 60 / 60 / 24;'
    19.5635185185185

    --
    I have a theory that the truth is never told during the nine-to-five hours. - Hunter S. Thompson
  26. Phew, my Newton's Safe! by scdeimos · · Score: 5, Funny

    Its epoch is midnight 01-Jan-1904 and it uses an unsigned 32-bit integer to count seconds since then. That means it will run out at 06:28:15 09-Feb-2040.

    But, I'm sure Apple will have released a new Newton by then! :P

    (I don't suppose anyone's ported the Rosetta writing recognition system to other PDA's, just in case?)

    1. Re:Phew, my Newton's Safe! by PenguiN42 · · Score: 1

      Why do people design systems with epochs like 1904? Do they expect the thing to travel backwards in time?

      --
      The following sentence is true. The preceding sentence was false.
    2. Re:Phew, my Newton's Safe! by scdeimos · · Score: 1

      I expect it has to do with recording Dates of Birth and such.

      Even 1904's a little optimistic, though, because I'm sure there are enough geeks out there with living parents or grandparents who were born before then.

      In this case though it may also have some significance to one of the original Apple engineers. :)

    3. Re:Phew, my Newton's Safe! by Detritus · · Score: 2, Informative
      The official explanation.

      Short version, it simplified leap-year calculations.

      --
      Mea navis aericumbens anguillis abundat
  27. i doubt much unix software is affected by Anonymous Coward · · Score: 1, Informative

    I saw one minor problem with time()==10^9 where some logging put the time_t in a 9-digit area. That rollover happened in 2001.

    The 2**30 rollover in January strikes me as pretty unlikely to affect much. Are there any commonly used 31-bit archs? (I think IBM s390 is but only for addressing, not data - please correct me if I'm wrong) In 18 years of working on UNIX software I don't think I've ever seen code to "cleverly" re-use the high bits on a time_t variable for something else.

    Oh well, back to waiting for 2038. I should be retired by then, have fun kids!

  28. I am not worried! by twoslice · · Score: 5, Funny

    I plenty left over from Y2K. For those who did not prepare for Y2K and laughed at all the suckers who stockpiled and hid in bunkers, Ha! I will finally have the last laugh! - going into my bunker now....

    --

    From excellent karma to terible karma with a single +5 funny post...
    1. Re:I am not worried! by SpaceLifeForm · · Score: 0

      Paul, it that you?

      --
      You are being MICROattacked, from various angles, in a SOFT manner.
    2. Re:I am not worried! by justzisguy · · Score: 1

      Don't forget your tin foil hat!

    3. Re:I am not worried! by mekkab · · Score: 1

      Nice sig.

      --
      In the future, I would want to not be isolated from my friends in the Space Station.
  29. Wrong writeup. by crapulent · · Score: 4, Interesting

    Could you be any MORE confusing? 2^30 is not 1 billion. It's 1,073,741,824. And the date as of right now is:

    $ date +%s
    1072051722


    So, yes, there is an issue with the date overflowing a 30 bit space. I'd hardly say it's relevant, any software that made such a braindead choice (why 30 and not 32 bits?) deserves to break. But it has nothing to do with a billion or anything else related to base 10. It hit 1 billion a long time ago, and it was covered then.

    1. Re:Wrong writeup. by quantaman · · Score: 1

      I took a glance at that article and found a little bit of perl that takes the time in seconds and gives you the date so

      $ perl -MPOSIX -le 'print ctime(1073741824)'
      Sat Jan 10 06:37:04 2004

      then I got a little curious and added an extra digit

      $ perl -MPOSIX -le 'print ctime(11073741824)'
      Fri Dec 13 13:12:00 1901

      well that is interesting isn't it...

      --
      I stole this Sig
    2. Re:Wrong writeup. by Anonymous Coward · · Score: 0

      Isn't that the oldest date available on the pre OS X macs?

    3. Re:Wrong writeup. by fucksl4shd0t · · Score: 1

      Ack! Worse yet!

      [dave@fiona dave]$ python
      Python 2.3 (#2, Aug 31 2003, 17:27:29)
      [GCC 3.3.1 (Mandrake Linux 9.2 3.3.1-1mdk)] on linux2
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import time
      >>> print time.ctime(1073741824)
      Sat Jan 10 05:37:04 2004
      >>> print time.ctime(11073741824)
      Fri Dec 13 12:45:52 1901

      I don't know what's scarier, knowing that this is likely to be gcc's or the kernel's fault, or knowing the Python and Perl had the same function name that took the same input and returned the same value.

      --
      Like what I said? You might like my music
    4. Re:Wrong writeup. by gnu-generation-one · · Score: 1

      "I'd hardly say it's relevant, any software that made such a braindead choice (why 30 and not 32 bits?) deserves to break"

      Just out of interest, why does somebody making a 32-bit choice not deserve their program to break in a short while?

      "We need to measure dates many centuries into the future... I know! I'll ignore all the calendar systems and functions, and count in milliseconds..."

    5. Re:Wrong writeup. by lobiusmoop · · Score: 0

      Although the 911 disaster the following day has probably drowned out the billenuim in history.

      --
      "I bless every day that I continue to live, for every day is pure profit."
  30. does anybody else think... by teridon · · Score: 3, Interesting

    that time should be stored as self-describing format, such as:
    header containing:
    2-bits (E) for # of bits for Epoch
    1-bit for whether the time is a floating point format
    if not floating, then:
    2-bits (N) for # of bits for the time
    2-bits (n) for # of bits for the resolution (1/2^n) (e.g. n=8 would mean 1/256 second resolution)
    if floating, then follow some IEEE standard representation.

    --
    I hold it, that a little rebellion, now and then, is a good thing. -- Thomas Jefferson
    1. Re:does anybody else think... by KrispyKringle · · Score: 2

      What would this solve? First, why would you want to store it as floating point? Floating point numbers incur a loss of precision that you don't want (because once the date gets pretty big, you won't be able to measure small time intervals--try it in C; if you add, say, 4.3 to four billion, you'll get four billion), and in fact instead of rolling over, floating point numbers reach ``infinity''. Second, this still limits the size to whatever your maximum is here (I'm not sure I understand your resolution thing--why measure in less than optimal resolution?). Third, there's no reason to make it, say, 33 bits. You may as well use the entire word, since the rest will probably be wasted, anyway.

    2. Re:does anybody else think... by ProtonMotiveForce · · Score: 1

      Nah - Windows has it right. Just use a 64-bit number and there's no longer an issue.

    3. Re:does anybody else think... by SpaceLifeForm · · Score: 1

      If you're going to go to that much trouble, you need to add some bits for TimeZoneOffset and a bit to indicate whether or not DayLightSavings is in effect or not. Otherwise, you have ambiguous timestamps when stored.

      --
      You are being MICROattacked, from various angles, in a SOFT manner.
    4. Re:does anybody else think... by Hanji · · Score: 1

      You're correct, but given that, does anyone know why the Objective-C Foundation Library has the following definition:
      typedef double NSTimeInterval;
      which it uses to measure all time intervals (such as in NSDate's methods)?

      --
      A Minesweeper clone that doesn't suck
    5. Re:does anybody else think... by axxackall · · Score: 1
      Just use a 64-bit number and there's no longer an issue.

      Until when?

      --

      Less is more !
    6. Re:does anybody else think... by Idolatre · · Score: 1

      Why not just store it as XML?

      <birthdate>
      <date:date xmlns:date="http://www.w3.org/2004/dml/">
      <date:year type="relative" reference="http://members.aol.com/JesusImages/">20 03</date:year>
      <date:month>12</date:month>
      <date:dayOfMonth>21</date:dayOfMonth>
      </birthdate >

    7. Re:does anybody else think... by Detritus · · Score: 1

      My guess is that it is because an IEEE double can be used to store and manipulate large (53-bit) integers. I've done that on systems that didn't support anything larger than 32-bit integral types. It's more portable than assuming the existence of "long long" or some other 64-bit integral type.

      --
      Mea navis aericumbens anguillis abundat
    8. Re:does anybody else think... by be-fan · · Score: 3, Insightful

      Argh! God I hate XML culture! How is this in any way better than a 64-bit integer???

      --
      A deep unwavering belief is a sure sign you're missing something...
    9. Re:does anybody else think... by mcpkaaos · · Score: 2, Funny

      How is this in any way better than a 64-bit integer???

      Maybe because XML is easier to deal with in Visual Basic than 64 bit ints? =P

      --
      It goes from God, to Jerry, to me.
    10. Re:does anybody else think... by Anonymous Coward · · Score: 0

      See the previous reference to RFC 2250. It deals with the matter in an exceedingly thorough manner. Merry Christmas

    11. Re:does anybody else think... by Jesus+2.0 · · Score: 1

      Over half a trillion years from now.

    12. Re:does anybody else think... by Anonymous Coward · · Score: 0

      $ echo '(2^64) / (60*60*24*365)'|bc
      584942417355

      Quite a while.

    13. Re:does anybody else think... by DAldredge · · Score: 1

      The heat death of the universe.

    14. Re:does anybody else think... by Anonymous Coward · · Score: 0

      Maybe because XML is easier to deal with in Visual Basic than 64 bit ints? =P

      Then maybe the problem is Visual Basic. :D

    15. Re:does anybody else think... by mlk · · Score: 1
      If other /.ers can be trusted, a little after the end of the Universe. But I think they are lieing:
      $ date -d "1/1/70 `dc -e '2 64 ^p'` secs"
      Thu Jan 1 00:00:00 GMTST 1970
      Eap.
      --
      Wow, I should not post when knackered.
    16. Re:does anybody else think... by Anonymous Coward · · Score: 0

      No! Store it as UTC, and translate in the application.

    17. Re:does anybody else think... by KrispyKringle · · Score: 1
      I think the other replier is right. Double's have greater precision than floats (double the precision, in fact :P), so probably are the best option. Ints can be small on some systems, and floats are relatively useless compared to doubles. I can't remember offhand if longs are standard or system-specific, but I'm inclined to think the latter.

      Or could it be that they prefer the rounding effect of floating point notation? After all, if you measure a really damn big interval, a few milliseconds probably don't matter a whole lot. So a TimeInterval, in that sort of usage, might not mind the loss of precision that would obviously be debilitating in, say, the datatype that actually holds the system time (bash$ date
      Sun Dec 21 sometime at night
      ).

    18. Re:does anybody else think... by Anonymous Coward · · Score: 0

      gee, like every modern *nix [1] ya' mean?

      [1] why do I suspect Unixware doesn't do this?

    19. Re:does anybody else think... by AsimovBesterClarke · · Score: 1

      Perhaps because it would make something like

      time_difference = time_last_checked - time_way_back;

      a real pain in the ass?

      --
      Ads are broken.
    20. Re:does anybody else think... by axxackall · · Score: 1

      Bill Gates' mentality when he said about 640K is more than enough.

      --

      Less is more !
    21. Re:does anybody else think... by ProtonMotiveForce · · Score: 1

      Hey, numbskull - they most certainly do NOT. Unless e.g. Redhat isn't modern?

    22. Re:does anybody else think... by Anonymous Coward · · Score: 0

      There are numbers you simply cannot represent exactly with either double or float. They are illsuited for time and currency. Anyway, why would you use a 64 bit float rep (double) when one can use a 64-bit integer, which is quite a few years, very roughly 584 billion years. I think that is enough for most applications. One can use a fixed point representation if 64bits in seconds is overkill of course.

    23. Re:does anybody else think... by ProtonMotiveForce · · Score: 1

      Almost - it's in ns since some epoch, not seconds. Still a long time.

    24. Re:does anybody else think... by Anonymous Coward · · Score: 0

      You should check out libtai. It is a time format by the author of qmail (and other infamous adventures), DJB.

      I've built my own libraries to deal with the format and after heavy thought on the subject, I do feel that it serves pretty much any practical purpose for timekeeping. 64 bits for the second with 0x4000000000000000 corresponding to the Unix epoch minus leap seconds since 1/1/1950 (commonly used as a reference epoch for astronomy), plus two 32 bit ints for the nano and atto fractional parts of a second for the TAINA flavor.

      It won't get us to Plancktime scales, but that's still quite a bit of resolution. And the library he provides is built to take into account TAI-appointed leapseconds! Very useful!

    25. Re:does anybody else think... by Anonymous Coward · · Score: 0

      What about Java's way of doing it? A 64-bit value indicating the number of milliseconds since the epoch. That puts the maximum date at Sun Aug 17 07:12:55 GMT 292278994. That's millisecond accuracy for almost 300 million years.

    26. Re:does anybody else think... by Anonymous Coward · · Score: 0

      IMO this is really the problem " if you add, say, 4.3 to four billion, you'll get four billion" theres no reason 4,000,000,004.3 shouldnt be returned.

    27. Re:does anybody else think... by Phroggy · · Score: 1

      ...no, nobody else does.

      --
      $x='S24;r)>63/* h@<5+oZ)32"5cz';$me='phroggy'x$];
      $x=~y+ -xz+\0-Tx+;print$_^chop$me for split'',$x;
    28. Re:does anybody else think... by smallpaul · · Score: 1

      This guy is describing a type-tagged binary structure. What does this have to do with "XML culture"? If type tags are now universally associated with XML then I guess C++ RTTI and Java introspection are all XML-based.

    29. Re:does anybody else think... by vrt3 · · Score: 2, Informative
      I'm sorry but you're wrong. Floating point numbers have such a large range because the fact that their point is floating gives them dynamic precision. That means that small numbers are very precise, while large numbers have much less precision.

      Think about it: a 32-bit floating point number can not possible have more different states than a 32-bit integer, yet it spans a much much larger range. It does so by sacrificing precision for large numbers.

      Just try it:
      #include <stdio.h>
      int main(void)
      {
      float a = 4e9;
      float b = 4.3;
      printf("%f\t%f\t%f\n", a, b, a+b);
      return 0;
      }
      Output:
      4000000000.000000 4.300000 4000000000.000000

      With doubles (64-bit floating point numbers) this example would work:
      #include <stdio.h>
      int main(void)
      {
      double a = 4e9;
      double b = 4.3;
      printf("%f\t%f\t%f\n", a, b, a+b);
      return 0;
      }
      gives 4000000000.000000 4.300000 4000000004.300000
      --
      This sig under construction. Please check back later.
    30. Re:does anybody else think... by fucksl4shd0t · · Score: 1

      If you're going to go to that much trouble, you need to add some bits for TimeZoneOffset and a bit to indicate whether or not DayLightSavings is in effect or not. Otherwise, you have ambiguous timestamps when stored.

      Absolutely not, on a timestamp. Store timestamps in GMT only. If you want to know locale-specific information about the timestamp, convert it to your locale using your locale settings---

      Wait, only one OS I know of the stores local time in the hardware clock. DO you know you're a troll? ;P

      --
      Like what I said? You might like my music
    31. Re:does anybody else think... by fucksl4shd0t · · Score: 1

      Why, exactly, should I have to handhold VB chimps?

      --
      Like what I said? You might like my music
    32. Re:does anybody else think... by be-fan · · Score: 1

      Didja reply to the wrong post? My parent poster tried to specify a time as 6 lines of very verbose XML!

      --
      A deep unwavering belief is a sure sign you're missing something...
    33. Re:does anybody else think... by Anonymous Coward · · Score: 0

      Actually ISO does have a standard for time (ISO 8601).
      <date> = yyyymmdd
      four-digit year (yyyy), two-digit montho (mm), and two-digit day (dd). Use Gregorian calender.
      <time> = hhmmss
      two-digit hour (hh), two-digit minute (mm), at least two-digit second (ss). Note that second is floating point, so it could be something like 02.12836192 if that level of precision is required.

      For specifying date and time together, use this format:
      <date>T<time>

      More details of the format are available. There are also many more resources avalable on-line that detail the isues involved with international time and extensibility. Furthermore, most databases have already had to tackle this problem. You will find their solutions to be similar.

      Please mod this up if for no other reason because I took the time to properly format the HTML even with all the "Character references" needed for the angle brackets.

    34. Re:does anybody else think... by hesiod · · Score: 1

      > A computer once beat me at chess, but it was no match for me at kick boxing.

      OT, but wouldn't that be "box kicking?"

    35. Re:does anybody else think... by Anonymous Coward · · Score: 0

      I have an ingenious scheme to store dates and times as STRINGS. They would be in the form YEAR-MONTH-DATE, and then maybe TIME as HOURS:MINUTES:SECONDS.PARTSOFSECONDS with perhaps an optional TIMEZONE. This format can be expanded freely to any size, and the year does not overflow. Furthermore, this is an ISO standard.

      Wow, the power of text. Stupid binary schmucks... if it has to last forever, use self-documenting text. When you need speed, you can handle the text-binary conversion at load/save time.

    36. Re:does anybody else think... by p3d0 · · Score: 1

      Oh good God almighty. If you can make something as simple as a date so complex and broken (floating point???), then please never write any software that I'm going to try to use.

      --
      Patrick Doyle
      I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
  31. what can we.. by fabio · · Score: 0

    Possibly use this information for? as far as i understand, this only affects very old systems, and you oughta be just a little up to date!

    i once read that UNIX would get troubles around 2038?

    --
    *resistance is futile, or fuzzy, i dunno*
  32. 1 billion != 2^30 by terremoto · · Score: 2, Informative

    It will soon be about 2^30 (1 billion, not 2 billion) seconds since 1970 (do the arithmetic).

    My arithmetic says that 1 billion = 1,000,000,000 whereas 2^30 is 1,073,741,824.

    The 1 billion rollover happened back in September 2001. The 2^30 rollover is in a few weeks time.

    1. Re:1 billion != 2^30 by geoffspear · · Score: 1

      sorry, 1 billion is 1,073,741,824. The new name for 1,000,000,000 is "billibion", to retaliate against the hard drive industry.

      --
      Don't blame me; I'm never given mod points.
    2. Re:1 billion != 2^30 by thebigmacd · · Score: 1

      I know you are being sarcastic, but still, you got it backwards.

  33. 1000000000 second bug by crow · · Score: 1

    A different, but related problem:

    It was a while ago when we hit one billion seconds. There was some concern that this would cause bugs in programs that printed the time in seconds using only nine digits. Much like Y2K, I don't remember anyone talking about it afterwords as having caused real problems.

    1. Re:1000000000 second bug by DASHSL0T · · Score: 1

      [i]Much like Y2K, I don't remember anyone talking about it afterwords as having caused real problems.[/i]

      Much like you didn't hear about people talking about their Y2K problems...because those that did have problems were [i]killed by the apocolyptic consequences[/i]! Their bodies are hidden in Roswell.

      --
      Freedom Is Universal
      Linux-Universe
    2. Re:1000000000 second bug by sfe_software · · Score: 1

      We had real problems at Y2K at the web hosting provider I worked for as a programmer. It's painful, but I'll recount the last few seconds of 1999...

      We were watching Office Space at the Boss' house (the Matrix DVD hadn't arrived yet), and it occurred to us that it was past midnight. We paused the movie and checked to see that everything was functioning normally, which we all expected. We just knew that all the Y2k nuts were crazy, didn't know what they were talking about, us geeks had a handle on things, etc. But we checked anyway...

      To our horror, we found that our web-based file manager was broken. Files created after the roll-over were showing the date as 19100, which didn't fit nicely into the table layout (I hadn't started using CSS for formatting yet). It looked horrible, not to mention our customers' resulting confusion.

      Of course, had I RTFM a bit early on, I'd have known how the year is represented in Perl, and that I should simply add 1900 to the result rather than append "19" as a string. Come to think of it, I really did know that, it just didn't occurr to me at the time. The code worked at the time, so I moved on without giving it a second thought. I always mess up some mundane detail (to paraphrase from the aforementioned movie).

      We eventually resolved the problem; few people were injured and little data was lost as a result. We then proceeded to resume the Office Space DVD at about 12:03, putting the incident our of our minds forever... until you brought back the horrible memories...

      Luckily, I won't be around for the 2^30 holocaust, and in 2038 I'll just be laughing from my bunker (which hopefully by then I will have been able to afford; maybe freelance work repairing dammage from 2^30?)

      --
      NGWave - Fast Sound Editor for Windows
    3. Re:1000000000 second bug by setantae · · Score: 1

      The s1g bug did actually hit the CVSup program - see http://people.freebsd.org/~jdp/s1g/ for the details.

  34. Kerching by sgbaug · · Score: 1

    Hey isn't this another opportunity for outrageous consultants fees and inflated IT salaries? Imagine the repercussions if your CEO got stuck in the lift 'cause of a 29 bit integer. Not to mention all the Java toasters out there that'll need upgrading. Get out there and start billing!

    1. Re:Kerching by grolschie · · Score: 1

      I'm not sure about Java toasters, but will my Java coffee maker be ok? Or my Java Beans grinder? ;-)

  35. Gee that's small potatoes by Rosco+P.+Coltrane · · Score: 3, Interesting

    I'm bracing for the 2034 Y2K (or is it Y2KATF) bug, the one that'll overflow the Unix time() function.

    You think I'm trying to be funny ? well let's see : people were worried that systems built in the 80s and before would display the 99 Cobol date bug, and/or the 2-digit date bug in 2000. 1980 and before is 20+ years ago, and there weren't that many computers/microcontroller around during those 20 years compared to what's to come, and operating systems weren't very unified. Today in 2004, we have kajillions of Unix machines around : how much do you bet a lot of these will still be running 30 years from now ?

    This said, I'm not bracing quite yet to tell the truth ...

    --
    "A door is what a dog is perpetually on the wrong side of" - Ogden Nash
    1. Re:Gee that's small potatoes by Anonymous Coward · · Score: 0

      Gee... I'll be 69 when that comes around...

      I don't think I care enough...

      And my Mac is 64 bit anyway, so I'll just wait around for a native 64-bit OS X which will have more than enough bits in the time_t to go around - and around - and around ;)

    2. Re:Gee that's small potatoes by SpaceLifeForm · · Score: 1

      It's 2038

      --
      You are being MICROattacked, from various angles, in a SOFT manner.
    3. Re:Gee that's small potatoes by Anonymous Coward · · Score: 0

      I'm worried about having clean underwear for work tomorrow and how to got out of work early to play NWN HoU for Linux with my 3rd character.. :)

    4. Re:Gee that's small potatoes by Anonymous Coward · · Score: 0

      The big problem will be with operating systems that aren't updated by then.

      SCO unix comes to mind.

  36. Heh, lots of ways of doing the same thing in Perl by Anonymous Coward · · Score: 0

    For the less insane amongst us:

    > perl -le 'print ((2 ** 30 - time()) / 60 / 60 / 24);';
    19.5553587962963

  37. Great, now MS is going to start getting bitchy.. by Lord+Bitman · · Score: 1

    "our systems only have a Y2K bug every few thousand years!"

    --
    -- 'The' Lord and Master Bitman On High, Master Of All
  38. ObCalculation by LaCosaNostradamus · · Score: 4, Interesting

    2^30 = 1073741824s ~= 34y 9d 97m

    1970JAN01 0000hr + (34y 9d 97m) ~= 2004JAN10 0137hr

    January 10th should be an interesting day for somebody.

    --
    [You have a stable society when some nut guns down a schoolyard and the law doesn't change.]
    1. Re:ObCalculation by Rick+Richardson · · Score: 2, Insightful

      $ date -d "1/1/70 `dc -e '2 30 ^p'` secs"
      Sat Jan 10 13:37:04 CST 2004

    2. Re:ObCalculation by Anonymous Coward · · Score: 0

      My Birthday will be so much fun

    3. Re:ObCalculation by Bombcar · · Score: 4, Informative

      Get the timezone right!

      date -u -d "1/1/70 `dc -e '2 30 ^p'` secs"
      Sat Jan 10 13:37:04 UTC 2004

      See man date

    4. Re:ObCalculation by soulsteal · · Score: 2, Funny

      How fitting that the time of a crash would be L337.

      I mean 13:37.

    5. Re:ObCalculation by LaCosaNostradamus · · Score: 1

      Alright, I can't stand it: My answer is 12 hours off from yours. What gives?

      I did the calculation twice (on a calculator). I found (using 365.25 days for an average year) that the components of 2^30 sec were 34y 9d 97m. I then simply ran 1970-01-01-0000 forward +34-00-09-0137. That's how I got to 1:37AM.

      --
      [You have a stable society when some nut guns down a schoolyard and the law doesn't change.]
    6. Re:ObCalculation by Waldon · · Score: 1

      Yeah, it's going to be my 21st birthday. Interesting vodka day indeed :)

    7. Re:ObCalculation by Fryboy · · Score: 1

      13:37?

      1337??

      The great hax0r in the sky is looking down upon us!

    8. Re:ObCalculation by Anonymous Coward · · Score: 1, Informative

      Take 34 years from 1/1/1970 as an example. 34*365.25 = 12418.5 days. But that's wrong. We know the exact number of days which is: 34*365 + 8 = 12418. There are 8 leap years between 1970 and 2004. Notice that it is off by exactly 1/2 day. Oh, and It should be 365.2422 days per year. There are also 22 leap seconds in that time period.

    9. Re:ObCalculation by Anonymous Coward · · Score: 0

      Although this has been said a thousand times all ready here's a scary sight with 2^31:

      [akira@melange akira]$ uname -a
      Linux melange.boulder.ibm.com 2.4.22-1.2115.nptl #1 Wed Oct 29 15:42:51 EST 2003 i686 i686 i386 GNU/Linux

      [akira@melange akira]$ date -u -d "1/1/70 `dc -e '2 31 ^p'` secs"
      Fri Dec 13 20:45:52 UTC 1901

  39. A note about the "funnies" by fireman+sam · · Score: 5, Interesting

    I've seen some comments about hey, another Y2K waste of time... blah blah blah. But think of it this way:

    1 - What if all the money that was spent to "fix" the Y2K bug actually fixed the bug.

    2 - Most people say that all the money spent "fixing" the Y2K bug was a waste because nothing happened.

    3 - How many people have insurance of some sort, and have never needed it (I am). Yet every year, you renew your policies.

    There are two things we can do about these "time" bombs. The first is to do nothing and hope that all is well. Or we could audit the code that may fail. A bit like paying insurance.

    [ PS: it is SCO's code, so they should pay ]

    --
    it is only after a long journey that you know the strength of the horse.
    1. Re:A note about the "funnies" by Trejkaz · · Score: 1

      Well I know you're right on the dot, because I fixed several Y2K bugs during my job in 1998, most of which were the "string 19 plus XX" bug. As for what would happen, I'm not sure. On our system the most it probably would have caused was users' accounts all being automatically expired at the same time ("you haven't logged in for 17,101 years"), unless there would be some monetary repurcussions of this.

      I imagine bank interest being the funniest one, that is if it were calculated correctly. Imagine the compounded interest over 17,101 years! But the compounding is actually what makes it a non-issue. The bank computer wouldn't have applied the compounding rule 17,101 unless it was completely retarded, but this situation is possibly why the banks of all places seemed to get freaked out the most.

      --
      Karma: It's all a bunch of tree-huggin' hippy crap!
    2. Re:A note about the "funnies" by cfuse · · Score: 1
      3 - How many people have insurance of some sort, and have never needed it (I am).

      Working in an insurance company, I can tell you it's nothing compared to the ratio of people who claim for insurance and haven't read the policy wording. Tip people: look for the words "We will not pay for ..."

    3. Re:A note about the "funnies" by lurker412 · · Score: 5, Informative
      I worked on a large Y2K program for a hospital chain. From what I observed, I can tell you this:

      There were, in fact, many problems that were found and fixed before they did any harm.

      A lot of infrastructure was upgraded on somewhat dubious claims of Y2K problems. In some cases, resetting the system clock once on 1/1/00 would have sufficed.

      Consulting firms and contractors had a feeding frenzy. Some added value, others did not.

      Many corporations were frightened by the prospect of lawsuits that might occur if they had Y2K problems. Lawfirms were licking their chops with anticipation.

      As a result of all of the above, for the only time in recorded history CIOs could get whatever they wanted. Naturally, they played it safe. Wouldn't you?

    4. Re:A note about the "funnies" by Kenja · · Score: 3, Insightful

      This is true of IT work in general. If you do your job, nothing happens and people think you're wsting time.

      --

      "Have you ever thought about just turning off the TV, sitting down with your kids, and hitting them?"
    5. Re:A note about the "funnies" by geekoid · · Score: 1

      "Most people say that all the money spent "fixing" the Y2K bug was a waste because nothing happened."

      I love that attitude.

      What, I paid you good money to fix that bug, why didn't everything break? I new it was a hoax!

      --
      The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
    6. Re:A note about the "funnies" by Allnighterking · · Score: 1

      [ PS: it is SCO's code, so they should pay ]
      [ Reply to This ]



      Damn .... so that's the code they are suing IBM over... Thanks....!!!

      --

      I'm sorry, I'm to tired to be witty at the moment so this message will have to do.

    7. Re:A note about the "funnies" by jonbryce · · Score: 1

      The problem with that is that the people who didn't spend lots of money fixing their computers also didn't have any problems.

    8. Re:A note about the "funnies" by AngryPuppy · · Score: 1

      People that didn't spend money on the problem were only people with unimportant systems.

      The problem was real. It only takes math knowledge to figure out how it worked:

      An insurance policy matures at age 65, for instance:

      Caculate age (some elements removed for simplicity):

      Birth Year:1935 (2 digits 35)
      Today:1999 (Two digits 99)

      99 - 40 = 64

      Now it's Y2K...maturity, right?

      00 - 40 = -40

      The policy never matures.

      Just because some people aren't affected doesn't mean there was no problem.

    9. Re:A note about the "funnies" by evilviper · · Score: 1
      1 - What if all the money that was spent to "fix" the Y2K bug actually fixed the bug.

      Some money went to fix the bug... 99% of the money went to incredible paranoia, and completely useless BS.

      How many people stocked-up on food, thinking that a computer clock rolling-over was going to launch nukes around the world? That's not reasonable and justified spending that solves the problem, that's complete ignorance, that didn't help anybody or anything.

      Now if you'll excuse me, I have to go complain to the lame developers that I can hear terrible artifacts in 320KBPS mp3s, so that they will "fix" the problem... hmpf.
      --
      Slashdot gets worse every day... Pipedot: News for nerds, without the corporate slant
  40. Water stock? by Uplore · · Score: 0

    I'd better go stock up on water again in case everything falls apart then...

    --
    I couldn't think of a sig.
  41. reserved bits? More probably... by chtephan · · Score: 1

    More probably there will be problems with bit arithmetics like time 1 or something.

  42. Seriously, why can't we fix this damn thing now? by Anonymous Coward · · Score: 5, Insightful

    Seriously, could we please get started fixing this 2038 bug now? I don't know if it's practical to change time_t to "long long"; if not, could we at least officially define the successor to time_t?

    I know that the emergence of 64-bit chips will alleviate this somewhat, but it wouldn't surprise me if at least embedded systems are still running 32-bits in 2038.

    I know that "long long" is common, but it's not part of the official C++ standard yet. Shouldn't we be putting this in the standard now? It's not too much to require language libraries to have 64-bit integer support (if necessary). This doesn't have to be painful.

    I'll feel a lot better the day that I know what I'm officially supposed to use instead of time_t -- or if I can be given a guarantee that time_t will be upgraded to 64 bits within the next few years.

  43. Are you a dog? by A+nonymous+Coward · · Score: 4, Funny

    Can you roll over?

  44. The Grinch by Anonymous Coward · · Score: 0

    Alternative headline:
    PTC Steals Christmas for many in IT.

  45. For Example by Anonymous Coward · · Score: 3, Funny

    Parametric Technologies has this problem. Seems they were trying to insert the year 2038 bug into their code, but the messed up and got the year 2004 bug instead.

  46. OT, but... what do you expect from CNet? by Artifex · · Score: 1, Offtopic

    One of the headlines on the news.com.com home page is "Lost? Hiding? Your sell phone is keeping tabs."

    If CNet doesn't even correct glaring spelling errors, how can anyone expect anything reliable from it?

    --
    Get off my launchpad!
    1. Re:OT, but... what do you expect from CNet? by geekoid · · Score: 1

      there just refering to a few years when your phone is always selling you crap.

      Walk past a coffee shop
      [ring ring]
      "stop in now for a latte, only 5.50!"

      --
      The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
  47. Fixed In Time by Ashcrow · · Score: 2, Interesting

    It seems like we will probably all be using 64bit computing by 2038 which will fix the problem itself. By then we won't have to worry for at least a few thousand years (I think).

    1. Re:Fixed In Time by ctr2sprt · · Score: 1

      A little longer than that. 2^63 seconds is more than 292 billion years, or something like 15 times the estimated age of the universe.

    2. Re:Fixed In Time by Anonymous Coward · · Score: 0

      64-bit computing doesn't make a 32-bit integer (eg time_t) 64-bit. Further, 32-bit CPUs have instructions to handle 64-bit integers already.

      The fix may be simple.. but it won't do it by itself.. and at the very least, recompilation of all running binaries has to be done to get the new 64-bit time types (and this may even break some if they are doing some math with the time).

    3. Re:Fixed In Time by scrod · · Score: 1

      Yeah, you'll be able to count the number of seconds in about 30 universe-lifetimes before overflowing.

    4. Re:Fixed In Time by BigBir3d · · Score: 1

      most likely 128 or 256 for all but the most rudimentary of processes.

    5. Re:Fixed In Time by iggymanz · · Score: 1

      The problem is if we want to do calcuations *now* with functions such as ctime(3) (which perl & python ctime methods use) on 32 bit platform that go out more than 34 years. I wish 32 bit Linux used a 64 bit time_t

    6. Re:Fixed In Time by Anonymous Coward · · Score: 0

      292 billion years should be enough for anybody!

  48. yup... by AntiTuX · · Score: 4, Informative

    http://maul.deepsky.com/%7Emerovech/2038.html

    antitux@TuX0r:~$ perl 2038.pl
    Tue Jan 19 03:14:01 2038
    Tue Jan 19 03:14:02 2038
    Tue Jan 19 03:14:03 2038
    Tue Jan 19 03:14:04 2038
    Tue Jan 19 03:14:05 2038
    Tue Jan 19 03:14:06 2038
    Tue Jan 19 03:14:07 2038
    Fri Dec 13 20:45:52 1901
    Fri Dec 13 20:45:52 1901
    Fri Dec 13 20:45:52 1901
    antitux@TuX0r:~$

    hrm..
    Looks like we're fucked too.

    1. Re:yup... by AntiTuX · · Score: 2, Informative

      Oh, and for those who care:

      antitux@TuX0r:~$ uname -a
      Linux TuX0r 2.6.0 #4 Sat Dec 20 18:38:44 MST 2003 i686 unknown unknown GNU/Linux
      antitux@TuX0r:~$

    2. Re:yup... by iggymanz · · Score: 1

      do perl -v too

    3. Re:yup... by AntiTuX · · Score: 1

      5.8.0

    4. Re:yup... by iggymanz · · Score: 1

      then we're screwed.

      I also tried with ruby (my favorite language)

      2147483641.upto( 2147483651) { | clock | print "testing: #{TiTue Jan 19 03:14:01 GMT 2038
      Tue Jan 19 03:14:02 GMT 2038
      Tue Jan 19 03:14:03 GMT 2038
      Tue Jan 19 03:14:04 GMT 2038
      Tue Jan 19 03:14:05 GMT 2038
      Tue Jan 19 03:14:06 GMT 2038
      Tue Jan 19 03:14:07 GMT 2038 ./t.rb:6:in `at': bignum too big to convert into `int' (RangeError)

    5. Re:yup... by kst · · Score: 1

      % perl 2038.pl
      Tue Jan 19 03:14:01 2038
      Tue Jan 19 03:14:02 2038
      Tue Jan 19 03:14:03 2038
      Tue Jan 19 03:14:04 2038
      Tue Jan 19 03:14:05 2038
      Tue Jan 19 03:14:06 2038
      Tue Jan 19 03:14:07 2038
      Tue Jan 19 03:14:08 2038
      Tue Jan 19 03:14:09 2038
      Tue Jan 19 03:14:10 2038
      % uname -rsm
      Linux 2.4.19-SMP ia64
      % perl -e 'print scalar gmtime 1e16, "\n"'
      Sat Jan 25 17:46:40 316889355

      So what's the problem again? 8-)}

    6. Re:yup... by Anonymous Coward · · Score: 0

      win2k + cygwin
      CYGWIN_NT-5.1 #### 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 unknown unknown Cygwin

      $ perl 2038.pl
      Tue Jan 19 03:14:01 2038
      Tue Jan 19 03:14:02 2038
      Tue Jan 19 03:14:03 2038
      Tue Jan 19 03:14:04 2038
      Tue Jan 19 03:14:05 2038
      Tue Jan 19 03:14:06 2038
      Tue Jan 19 03:14:07 2038
      Fri Dec 13 20:45:52 1901
      Fri Dec 13 20:45:52 1901
      Fri Dec 13 20:45:52 1901

    7. Re:yup... by Lord+of+Ironhand · · Score: 2, Funny

      > http://maul.deepsky.com/%7Emerovech/2038.html

      That page is worth visiting for the disclaimer alone:

      "PUBLIC NOTICE AS REQUIRED BY LAW: Any use of this Web page, in any manner whatsoever, will increase the amount of disorder in the universe. Although no liability is implied herein, the consumer is warned that this process will ultimately lead to the heat death of the universe."

    8. Re:yup... by Anonymous Coward · · Score: 0

      C:\Documents and Settings\usr>./2038.pl
      '.' is not recognized as an internal or external command,
      operable program or batch file.

      Uh oh.

    9. Re:yup... by ImTwoSlick · · Score: 1

      slick@wopr test $ ./clock.pl
      Tue Jan 19 03:14:01 2038
      Tue Jan 19 03:14:02 2038
      Tue Jan 19 03:14:03 2038
      Tue Jan 19 03:14:04 2038
      Tue Jan 19 03:14:05 2038
      Tue Jan 19 03:14:06 2038
      Tue Jan 19 03:14:07 2038
      Tue Jan 19 03:14:07 2038
      Tue Jan 19 03:14:07 2038
      Tue Jan 19 03:14:07 2038

      Mac OSX 10.3 running on 64-bit Dual G5

    10. Re:yup... by PipianJ · · Score: 1

      So Apple decided to use the same binaries for Panther on G5 than G4?

    11. Re:yup... by nofx911 · · Score: 1

      AlphaServers running Linux do not seem to be affected. Here is the output of an AlphaServer 4100 running RedHat 7.3:

      [xx@pabst xx]$ uname -a
      Linux pabst 2.4.18-27.7.x.hpsmp #1 SMP Mon May 12 23:40:14 EDT 2003 alpha unknown

      [xx@pabst xx]$ perl time.pl
      Tue Jan 19 03:14:01 2038
      Tue Jan 19 03:14:02 2038
      Tue Jan 19 03:14:03 2038
      Tue Jan 19 03:14:04 2038
      Tue Jan 19 03:14:05 2038
      Tue Jan 19 03:14:06 2038
      Tue Jan 19 03:14:07 2038
      Tue Jan 19 03:14:08 2038
      Tue Jan 19 03:14:09 2038
      Tue Jan 19 03:14:10 2038

    12. Re:yup... by Neillparatzo · · Score: 1

      Of course. Notice how it rolls over to Friday the 13th?

  49. Re:Seriously, why can't we fix this damn thing now by Yaa+101 · · Score: 3, Funny

    Nah, why take away the thrill and jobs of our childrens,childrens,childrens,childrens,childrens, childrens,childrens,childrens,childrens,childrens, childrens,childrens,childrens,childrens,childrens, childrens,childrens,childrens,childrens,children?

  50. different response on solaris 8 by E-Lad · · Score: 5, Interesting

    [daleg@lithium]~>perl 2038.pl
    Tue Jan 19 03:14:01 2038
    Tue Jan 19 03:14:02 2038
    Tue Jan 19 03:14:03 2038
    Tue Jan 19 03:14:04 2038
    Tue Jan 19 03:14:05 2038
    Tue Jan 19 03:14:06 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    [daleg@lithium]~>uname -rs
    SunOS 5.8

    Interesting, it stays at the limit rather than rolling over.

    1. Re:different response on solaris 8 by /dev/trash · · Score: 1

      Mon Jan 18 22:14:01 2038
      Mon Jan 18 22:14:02 2038
      Mon Jan 18 22:14:03 2038
      Mon Jan 18 22:14:04 2038
      Mon Jan 18 22:14:05 2038
      Mon Jan 18 22:14:06 2038
      Mon Jan 18 22:14:07 2038

      This on Windows 98 running ActiveState perl 5.8

    2. Re:different response on solaris 8 by muonzoo · · Score: 1
      Oddly enough Mac OS/X 10.3.2 produces:

      toor$ perl /tmp/2038.pl
      Tue Jan 19 03:14:01 2038
      Tue Jan 19 03:14:02 2038
      Tue Jan 19 03:14:03 2038
      Tue Jan 19 03:14:04 2038
      Tue Jan 19 03:14:05 2038
      Tue Jan 19 03:14:06 2038
      Tue Jan 19 03:14:07 2038
      Tue Jan 19 03:14:07 2038
      Tue Jan 19 03:14:07 2038
      Tue Jan 19 03:14:07 2038
      toor$ _
    3. Re:different response on solaris 8 by tek_hed · · Score: 1

      Same thing on AIX 4.3 and AIX 5.2:

      mikeg@xxxxx17:~ >./2038.pl
      Tue Jan 19 03:14:01 2038
      Tue Jan 19 03:14:02 2038
      Tue Jan 19 03:14:03 2038
      Tue Jan 19 03:14:04 2038
      Tue Jan 19 03:14:05 2038
      Tue Jan 19 03:14:06 2038
      Tue Jan 19 03:14:07 2038
      Tue Jan 19 03:14:07 2038
      Tue Jan 19 03:14:07 2038
      Tue Jan 19 03:14:07 2038

  51. So.... by Coppit · · Score: 2, Funny

    So does this mean we can sue SCO if our systems crash?

  52. rash of naughty dates coming by iggymanz · · Score: 5, Informative

    These might be a problem for many slashdot readers down the road, I for one plan on being likely dead, what with being old fart already. So here's those "overflow" dates, mm/dd/yyyy U.S.A. format:
    02/06/2036 - systems which use unsigned 32-bit seconds since 01/01/1900
    01/01/2037 - NTP time rolls over
    01/19/2038 - Unix 32 bit time, signed 32 bit seconds (that's to say, 2^31) since 01/01/1970
    02/06/2040 - Older Macintosh
    09/17/2042 - IBM 370 family mainframe time ends, 2^32 "update intervals, a kind of 'long second'" since 01/01/1900
    01/01/2044 - MS DOS clock overflows, 2^6 years since 01/01/1980
    01/01/2046 - Amiga time overflows
    01/01/2100 - many PC BIOS become useless
    11/28/4338 - ANSI 85 COBOL date overflow, 10^6 days since epoch of 01/01/1601

    and my personal favorite,
    07/31/31086 - DEC VMS time overflows

    1. Re:rash of naughty dates coming by Yaztromo · · Score: 4, Informative

      I'd like to add to that January 1st, 2032, which is when the date structure in older Macs and PalmOS devices will overflow.

      Yaz.

    2. Re:rash of naughty dates coming by chickenwing · · Score: 5, Funny

      Hmm, it seems that the date that a system's clock overflows is inversely proportional to the date that the system has outlived its usefulness

    3. Re:rash of naughty dates coming by Nimey · · Score: 1

      That's... frightening that COBOL programs might still be in use in the 4330s. I could see it happening, though. Some poor schmoe who's been frozen since his death is resurrected to fix code he wrote more than 2000 years ago...

      --
      Hail Eris, full of mischief...

      E pluribus sanguinem
    4. Re:rash of naughty dates coming by jonbryce · · Score: 1

      Translation for en-GB readers amoung us

      06/02/2036 - systems which use unsigned 32-bit seconds since 01/01/1900
      01/01/2037 - NTP time rolls over
      19/01/2038 - Unix 32 bit time, signed 32 bit seconds (that's to say, 2^31) since 01/01/1970
      06/02/2040 - Older Macintosh
      17/19/2042 - IBM 370 family mainframe time ends, 2^32 "update intervals, a kind of 'long second'" since 01/01/1900
      01/01/2044 - MS DOS clock overflows, 2^6 years since 01/01/1980
      01/01/2046 - Amiga time overflows
      01/01/2100 - many PC BIOS become useless
      28/11/4338 - ANSI 85 COBOL date overflow, 10^6 days since epoch of 01/01/1601

    5. Re:rash of naughty dates coming by Anonymous Coward · · Score: 0

      Thank you very much. Do you by chance know when they'll be adding the 19th month to the year? Is this only going to be happening to en-GB readers?

    6. Re:rash of naughty dates coming by jonbryce · · Score: 1

      No. You see, unlike the dislexic en-US readers amongst us, we actually express our dates in a sensible order - dd/mm/yy rather than mm/dd/yy.

    7. Re:rash of naughty dates coming by aclute · · Score: 1

      *zoom*

      What day is the 17th day of the 19th month?

      Also, how is it *more* sensible your way? You might be used to that, but I wouldn't say it is more sensible.

      The US way seems to make sense -- you say a date like this "Janurary 27th, 1976" and our date rep looks the exact same way -- 01/27/76. The both are the same format, "month-year-day".

    8. Re:rash of naughty dates coming by aclute · · Score: 1

      or, as I really meant to say "month-day-year"

    9. Re:rash of naughty dates coming by jonbryce · · Score: 1

      I say a date like this:

      27th January 1976. Much more logical IMO. You start with the least significant item - the day of month, then a bit more significant - the month, then the most significant - the year.

      The Japanese and Arabs say it as 1976/01/27, but of course they write from right to left.

    10. Re:rash of naughty dates coming by iggymanz · · Score: 1

      which of course is just the shortened form of the way the GB folks used to say them:
      the 17th day of the month of June in the year of our Lord one thousand, ninehundred, four score and seventeen. [ /me goes to powder wig ]

    11. Re:rash of naughty dates coming by Ben+Hutchings · · Score: 1

      MS-DOS uses a 7-bit year counter and I can't think why it would be signed (all the other time fields are unsigned) so I would expect it to work until 2108.

      AmigaOS uses a 32-bit second counter which is definitely unsigned so it should be OK until 2114 (the epoch is 1978). The battery-backed clock driver would probably need to be patched before 2078 though.

      Some more dates:

      06/07/2079 - SQL Server SMALLDATETIMEs

      01/01/10000 - ANSI SQL DATEs and TIMESTAMPs

    12. Re:rash of naughty dates coming by OverlordQ · · Score: 1

      Nah, my favorite is this:

      2^1E80 approx. - As there are only about 1E80 particles in the observable universe, it has by now become impossible to write the date.

      We're really screwed then.

      --
      Your hair look like poop, Bob! - Wanker.
    13. Re:rash of naughty dates coming by iggymanz · · Score: 1

      yes the filesystem in MS-DOS' timestamp overflows on jan 01, 2108, but the internal clock has 6 bit for year (go figure)

    14. Re:rash of naughty dates coming by iggymanz · · Score: 1

      Amiga says it is signed and you're SOL after 19 January, 2046, 03:14:07.

      " As was outlined above, the Amiga measures time in seconds. As it turns out, the number of seconds to accumulate until 19 January, 2046, 03:14:07 will form the largest value a signed 32 bit integer number can hold.....AmigaDOS, which always treats time as a signed quantity, will consider this date to be invalid because it is "negative". " -- Amiga.com

    15. Re:rash of naughty dates coming by iggymanz · · Score: 1

      Ick, that didn't come out right. Filesystem uses 7 bit year, internally 6 bit year. MS-DOS internal dates crap out first in 21st century, then the filesystem on filesystem craps out in 22nd century.

  53. mid life bug by Anonymous Coward · · Score: 5, Funny

    maybe a midlife crisis is just our internal clocks rolling over.

  54. Air Traffic Control (again) by Jetson · · Score: 1
    The program in question was revised in 1997. Most companies already had kicked off their Y2K programs by then.

    The thing to remember is that "Y2K Program" doesn't neccessarily mean "fix the software". For example, one of the computer systems used for air traffic control in Canada is not Y2K-compliant. Rather than fixing the bug (which could have introduced more errors than were solved), the engineers looked at how the date was being used and what mitigation strategies could be applied. In the end, they determined that the simple solution was to change the clock back by exactly 24 years, as 1976 would match 2000 in both day-of-week and leap-year calculations. That computer is still running under the delusion that it's currently December 1979. In the end nobody cares that it's not Y2K compliant because we don't keep data for 24 years and therefore the erroneous date can never lead to confusion between current and historical data.

    1. Re:Air Traffic Control (again) by lurker412 · · Score: 1

      Whatever works is fine, even if it is a tad ugly. However, according to the article, "It's not something where they would lose data," Gavaghan said. "The software just stops working." So it doesn't sound like PTC has come up with a workaround. Maybe it's just me, but I find it especially ironic that the company in question specializes in product lifecycle management! Live fast, die young?

    2. Re:Air Traffic Control (again) by Anonymous Coward · · Score: 0

      Try 1972. Otherwise you're right - the cycle is the same, and it'll hold up for now - at least until they reach 2000 again.

  55. Re:Seriously, why can't we fix this damn thing now by Eric+Smith · · Score: 0, Troll
    I know that "long long" is common, but it's not part of the official C++ standard yet.

    Who cares about C++? Blech!

    "long long" is in the C standard (ISO/IEC 9899:1999(E)), but it's much better to use int64_t or uint64_t, which are also defined in the standard ().

  56. Party Like Its 2037 by yintercept · · Score: 5, Interesting

    2038 will be a big mess.

    For the first programming job I had (at an insurance agency) they were using 9/9/99 as infinity. So, if your benefits mysteriously stopped a few years ago...hey, it wasn't my fault!

    The most interesting time related bug I came across was with a RDBMS called Advanced Revelation. The program counted days from 1/1/1970. In May 1997 the sequence counter went from 4 to 5 digits. It was interesting, the database was stable, but there were quite a few reports and add ons that were designed to expect a 4 digit number.

    BTW, I built a 3/3/3333 into a program that I wrote for a company.

    1. Re:Party Like Its 2037 by grazzy · · Score: 5, Funny
      BTW, I built a 3/3/3333 into a program that I wrote for a company.

      That does NOT count as a sufficient documentation of the above feature!
    2. Re:Party Like Its 2037 by Reziac · · Score: 3, Funny

      At noon on December 31st, 2001, the Y2K fix for BlueWave (my offline BBS mail reader) stopped working. But only for one version. The Y2K fix still works with a slightly later version. Someone speculated that it was due to the older version being exactly n-many seconds old (from compile date) and at that point, some poorly coded function ran out of date space.

      Back in 1999, some BBS door functions stopped working, apparently due to running out of single-digit dates. *sigh*

      In the Closet I have a P90 that ever since Y2K, firmly believes the year is 2094. Oddly enough, NWDOS7 thinks this is a perfectly acceptable date!

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    3. Re:Party Like Its 2037 by Baki · · Score: 2, Interesting

      At the moment we are using 31-dec-9999 as infinity (the max date Oracle can represent). I think chances are pretty slim that todays systems are still running in 9999.

    4. Re:Party Like Its 2037 by Feztaa · · Score: 1

      I think chances are pretty slim that todays systems are still running in 9999.

      That's the kind of thinking that got us into the Y2K mess in the first place :)

    5. Re:Party Like Its 2037 by MonkeyBoy · · Score: 2, Funny

      NWDOS7 thinks it's a perfectly acceptable date, but is secretly wondering why you're still using it on a P90 in 2094.

      --

      Moof!

    6. Re:Party Like Its 2037 by qw(name) · · Score: 1

      I don't remember there being a Y2K fix for BlueWave. Maybe it was just on the BBS side because I distinctly remember the author saying that BlueWave will no longer be supported after Y2K. It was a wonderful program. I missed it's functionality immensely.

      The years 1999-2000 were pivotal in the existence of local BBSs. As you stated in your post, many of the BBS doors stopped working due to two-digit years, the price of dial-up internet access dropped and on-line time increased exponentially. This effectively eliminated the need for BBSs.

      BTW, I maintained a FIDONet point up until about 6 months ago. :-) I was holding out as long as I could!

    7. Re:Party Like Its 2037 by poot_rootbeer · · Score: 1

      I have a P90 that ever since Y2K, firmly believes the year is 2094. Oddly enough, NWDOS7 thinks this is a perfectly acceptable date!

      That should be sufficient proof to stave off the "NWDOS* is Dying" trolls for another 90 years or so!

    8. Re:Party Like Its 2037 by Reziac · · Score: 1

      LOL!! Well, actually that machine got retired a couple years ago, tho it's still in The Closet (where old computers go to die) and ready to go should it hear the call. And technically, it's a P75 with delusions of grandeur and a floating point bug. :)

      Hey, I have a dog called "Monkey Boy", no kidding!

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    9. Re:Party Like Its 2037 by Reziac · · Score: 1

      BlueWave hadn't been supported to speak of since about two minutes after they released it... I reported several fatal bugs with zero result. :(

      As to the Y2K fix for BlueWave, it's a kludge, but it works -- at least for v2.30; it quit working with v2.12 as noted, tho not on all systems (apparently it still works for its author, but not for me nor either of my two clients that use BW). It can be found somewhere on http://www.kannoncom.com/~jhanoian/readers/
      [root s around] Ah, here it is, http://www.kannoncom.com/~jhanoian/readers/files/b wrf065.zip (beware the /. space)

      Dialup is pretty well dead, tho telnetable BBSs are growing. We still have a dialup BBS (Earthquake City BBS, Wildcat 4.20 on Netware 3.20), but it's is mostly for the Real Sysop's email, my backup email, and as a convenient file repository. Only about 5 regular users left, mostly for INtelec. Would be nice if it were telnetable, but the Real Sysop doesn't have time to research it and doesn't want to switch off WC4.20 (and I don't blame him!) I telnet into techware.dynip.com every day for ILink. Haven't done FIDO in several years myself, the echoes that interested me having either died off or gone to all Russian speakers!

      Anyway, between 'em, I still use BlueWave every day. (Lightly hacked to call itself Heat Wave, Cold Wave, or CrimeWave :)

      Tho with the increasing state of gov't snooping, the dialup BBS may become the only way to have truly secure email, since there are no exposed packets. Assuming no one taps your phone line! :)

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    10. Re:Party Like Its 2037 by Reziac · · Score: 1

      LOL!! Hey, I forgot to mention... Win3.11 for Workgroups thought 2094 was an acceptable date as well. Clearly it was gullible enough to believe anything NWDOS7 told it. :)

      So, take that, Microsoft... Win3.1x will live forever! :D

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    11. Re:Party Like Its 2037 by HTH+NE1 · · Score: 1

      Back in 1999, some BBS door functions stopped working, apparently due to running out of single-digit dates. *sigh*

      GBBS "Pro" for the Apple II had a Y2K-like problem 10 years early. The author apparently didn't expect the software to still be in use beyond 1990, so 1989 was followed by "198:". First attempts to fix this by users resulted in systems thinking the year was "199:". But it caused no stability problems; it was purely cosmetic.

      A later version fixed this, but also enforced the printing of a copyright notice to occur every time a user logged out. This was annoying for the sysops who scrapped the GBBS "Pro" code and wrote their own BBS atop/in the ACOS engine/language.

      --
      Oh, say does that Star-Spangled Banner entwine / The myrtle of Venus with Bacchus's vine?
    12. Re:Party Like Its 2037 by Anonymous Coward · · Score: 0

      Umm, why wouldn't 2094 be an acceptable date? It looks like the problem is your computer, and not the operating system. In other words, the NWDOS7 folks did a good job of ensuring their operating system would work well into the future, while the designers of your P90 didn't. Unless you're talking about submachine guns, in which case I suppose they might be running NWDOS7 in 2094...

    13. Re:Party Like Its 2037 by Reziac · · Score: 1

      There sure was a lot of shortsightedness back in that era, eh? but BBSing was essentially a hobbyist thing, and a lot of the folk involved were kids, with kids' short attention spans. Oh well.

      I use a version of Buerg's LIST that doesn't get Y2K and displays dates as 0:, 0], etc. I'm used to it, and don't really care so long as it still sorts files correctly; I know that 0: is 01, and that's all I require.

      BlueWave with the Y2K fix displays truly amazing dates, hardly better than without it. Frex, today apparently is 06 Feb 03, or something like that. But so long as the REP packet is correct when the BBS recieves it, no one cares. :)

      What is unbelievable is that someone is still collecting registration money for BlueWave, fatal Y2K bug and all, yet it will never be fixed. Fortunately, an "alternative registration solution" exists. ;)

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    14. Re:Party Like Its 2037 by pod · · Score: 1
      In the Closet I have a P90 that ever since Y2K, firmly believes the year is 2094. Oddly enough, NWDOS7 thinks this is a perfectly acceptable date!

      Why is that odd? 2094 IS a perfectly acceptable date.

      --
      "Hot lesbian witches! It's fucking genius!"
    15. Re:Party Like Its 2037 by Reziac · · Score: 1

      Cool! I'll call you -- say, January 15th of 2094? That gives time for the holiday rush to die down. :)

      --
      ~REZ~ #43301. Who'd fake being me anyway?
    16. Re:Party Like Its 2037 by Anonymous Coward · · Score: 0

      I'd like to extend my personal condolences at having to use Advanced Revelation.

      The company, now Open Insight, should be dismantled brick by brick.

  57. XML format by axxackall · · Score: 1
    <timestamp>
    <time value="20:11" presentation="24h" />
    <timezone code="EST" version="1984" />
    <date year="2003" month="December" monthday="21" />
    <calendar code="whatever" />
    </timestamp>
    --

    Less is more !
    1. Re:XML format by Anonymous Coward · · Score: 0

      You post all that garbage and your sig is 'Less is More!', hmm?

  58. Damn... by mschoolbus · · Score: 1

    Wish I knew COBOL better than I do... I'd be rich! ;)

    1. Re:Damn... by kiwirob · · Score: 2, Funny

      I used to do a bit of COBOL, but also have cut my teath with a few years experience with S370 Assembler. I could probably earn good money with that too. But I'm not sure i WANT to!!!

  59. Ob COBOL Y2K joke by Anonymous Coward · · Score: 3, Funny

    There was once a COBOL programmer in the mid to late 1990s. He became a private consultant specializing in Year 2000 conversions. He was working 70 and 80 and even 90 hour weeks and travelled through 20 different countries, but it was worth it.

    Several years of this relentless, mind-numbing work had taken its toll on Jack. He had problems sleeping and began having anxiety dreams about the Year 2000. He must have suffered some sort of breakdown. Jack decided to contact a company that specialized in cryogenics. He made a deal to have himself frozen until March 15th, 2000. This was very expensive process and totally automated. The next thing he would know is he'd wake up in the year 2000; after the New Year celebrations and computer debacles; after the leap day. Nothing else to worry about except getting on with his life.

    He was put into his cryogenic receptacle, the technicians set the revive date, he was given injections to slow his heartbeat to a bare minimum, and that was that. The next thing that Jack saw was an enormous and very modern room filled with excited people. They were all shouting "I can't believe it!" and "It's a miracle" and "He's alive!". There were cameras (unlike any he'd ever seen) and equipment that looked like it came out of a science fiction movie. Someone who was obviously a spokesperson for the group stepped forward. Jack couldn't contain his enthusiasm. "It is over?" he asked. "Is 2000 already here? Are all the millennial parties and promotions and crises all over and done with?"

    The spokesman explained that there had been a problem with the programming of the timer on Jack's cryogenic receptacle, it hadn't been year 2000 compliant. It was actually eight thousand years later, not the year 2000. But the spokesman told Jack that he shouldn't get excited; someone important wanted to speak to him.

    Suddenly a wall-sized projection screen displayed the image of a man that remarcably looked very much like Bill Gates. This man was Prime Minister of Earth. He told Jack not to be upset. That this was a wonderful time to be alive. That there was world peace and no more starvation. That the space program had been reinstated and there were colonies on the moon and on Mars. That technology had advanced to such a degree that everyone had virtual reality interfaces which allowed them to contact anyone else on the planet, or to watch any entertainment, or to hear any music recorded anywhere.

    "That sounds terrific," said Jack. "But I'm curious. Why is everybody so interested in *me*?"

    "Well," said the Prime Minister. "The year 10000 is just around the corner, and it says in your files that you know COBOL...."

  60. This Only Hits 1 Company! Who Cares? by klausner · · Score: 3, Informative

    If you read the Cnet artlcle, this only affects software from a single company, and they are supposed to be "product lifecycle management" specialists. Why would anyone else care? The rest of us have until 2038 before there is a problem. Probably will get fixed in the 4.2 kernel.

    1. Re:This Only Hits 1 Company! Who Cares? by iggymanz · · Score: 1

      well, you're not from the CADD world - Pro/E (one of the PTC packages affected) is used by *thousands* of world's biggest manufacturing corporations including aircraft, automotive, heavy-equipment, switchgear, etc.

    2. Re:This Only Hits 1 Company! Who Cares? by wayne606 · · Score: 1

      Yeah, but who cares about the timestamps on CAD parts? "Oops, I guess my memory is faulty - I didn't design that gismo yesterday but 30 years ago. Better throw the model away and start over". Anyway, ProE is not the market leader any more - Catia and UG are where it's at.

    3. Re:This Only Hits 1 Company! Who Cares? by klausner · · Score: 1

      Lots of folks have their lives revolve around one software package. That doesn't change the fact that CADD users are a tiny percentage of the world, and PTC has only a part of even that market.

      So again: For 99% of us, who cares?

  61. Optimization and real-time games by tepples · · Score: 0, Offtopic

    leave bits and bytes to assembly kernel/driver programming and to compiler programmers. Normal application programmer should work with symbols.

    So would an entire game graphics engine be considered a "driver" under your taxonomy?

    Besides, with 10GHz 8xCPU 64GB-RAM typical home computers who cares

    Multimedia apps will still need every cycle they can get to make a more immersive projection of reality onto a display, no? Radiosity lighting and Monte Carlo raytracing still cost cycles.

  62. same response on IRIX64 by Anonymous Coward · · Score: 0

    $ ./2038.pl
    Tue Jan 19 03:14:01 2038
    Tue Jan 19 03:14:02 2038
    Tue Jan 19 03:14:03 2038
    Tue Jan 19 03:14:04 2038
    Tue Jan 19 03:14:05 2038
    Tue Jan 19 03:14:06 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    $ uname -rs
    IRIX64 6.5
    $ perl -v
    This is perl, v5.6.1 built for irix-n32

    Copyright 1987-2001, Larry Wall

  63. Time stops for OS X by shking · · Score: 2, Interesting
    Don't know if the problem is OS X 10.2.8 or Perl 5.6, but time just stops at Jan 19 03:14:07 2038 on my mac

    http://maul.deepsky.com/~merovech/2038.html

    mikebabu% perl 2038.pl
    Tue Jan 19 03:14:01 2038
    Tue Jan 19 03:14:02 2038
    Tue Jan 19 03:14:03 2038
    Tue Jan 19 03:14:04 2038
    Tue Jan 19 03:14:05 2038
    Tue Jan 19 03:14:06 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038

    --
    -- "At Microsoft, quality is job 1.1" -- PC Magazine, Nov. 1994
    1. Re:Time stops for OS X by zhenlin · · Score: 1

      Curious... I see... 3.14, and 7 - all that's needed now is 22!... 19+3 = 22! Pi is in that date!

    2. Re:Time stops for OS X by BigBir3d · · Score: 1

      10.3.2 does the same.

  64. Embedded systems by tepples · · Score: 3, Insightful

    Perhaps all time counters should be bignums?

    Bad idea. A "system to contain radioactive wastes" will usually be an embedded system with a fixed memory. Fixed-memory machines need fixed-size data structures, and a 64-bit count of seconds should hold even over lifetime-of-the-Universe or lifetime-of-copyright time scales.

  65. Not if you have a 64 bit machine :) by Anonymous Coward · · Score: 1, Informative

    $ ./2038.pl
    Tue Jan 19 03:14:01 2038
    Tue Jan 19 03:14:02 2038
    Tue Jan 19 03:14:03 2038
    Tue Jan 19 03:14:04 2038
    Tue Jan 19 03:14:05 2038
    Tue Jan 19 03:14:06 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:08 2038
    Tue Jan 19 03:14:09 2038
    Tue Jan 19 03:14:10 2038
    $ uname -mrs
    Linux 2.4.9-40smp alpha
    $ perl -v

    This is perl, v5.6.0 built for alpha-linux

    Copyright 1987-2000, Larry Wall

  66. Not that big of a deal by Anonymous Coward · · Score: 0

    I use Pro/Engineer on a daily basis, and the problem has been blown out of proportion for the majority of users. Unless you use some of the more exotic modules PTC offers, it's not a problem.

    BTW, Pro/Wildfire rocks on Linux!

  67. Testing? We don't need no stinking testing! by coleca · · Score: 2, Funny

    "It's such a simple flaw; we don't believe it requires extensive testing to deploy the patches," he [PTC spokesman Joe Gavaghan] said.

    That's an excellent plan! Nothing bad has ever come from that train of thought before.

    In future news, PTC spokesman Joe Gavaghan is now working for Microsoft's Security division.

  68. Oh no! Groundhog day! by meowsqueak · · Score: 3, Funny

    Nooooooo!!

  69. Use Planck-Time and 256Bit Integers by Walabio · · Score: 5, Interesting

    If we use Plank-Time and 256bit integers, we can handle 1.981384141637854Year*E+26. We should handle time as 256bit integer based on placktime and convert to local human time-standards as needed. We should support for a second 256bit imaginary integer and conversion to two floating point-math-units (one real and one imaginary) because some calculations in Physics involving time occur on the complex plain. I propose that zero-time be zero Julian Date.

    1. Re:Use Planck-Time and 256Bit Integers by Anonymous Coward · · Score: 0

      Why not just use the beginning of the universe as the start point for the 256-bit Planck time clock?

      (BTW, too bad I don't have some mod points to spend -- Planck units are the perfect rebuttal to those that claim the metric system is the best around)

    2. Re:Use Planck-Time and 256Bit Integers by John+Hasler · · Score: 1

      Zero-time should be the instant of the Big Bang. By the time 256 bit cpus are standard we should know that accurately.

      --
      Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
    3. Re:Use Planck-Time and 256Bit Integers by Nimey · · Score: 1

      Is it even possible to reliably measure how many units of Planck time pass in a given interval, theoretically or otherwise?

      --
      Hail Eris, full of mischief...

      E pluribus sanguinem
    4. Re:Use Planck-Time and 256Bit Integers by Walabio · · Score: 4, Interesting

      This is a response to the first two replies

      John Hasler:

      Zero-time should be the instant of the Big Bang. By the time 256 bit cpus are standard we should know that accurately.

      I thought about zero-time being the big bang. I figured that since the big is not known very accurately, it would not be a good idea. On second thought, if we revise the time and the conversion-tables (something which is necessary anyway as the value of the Planck-Time-Unit (5.4*E-44)) with revision of the time of the big bang, it will work. If we use the time of the big bang, we will have to include the version of the revision along with the time stamp or else the text file from one year ago will show as from one billion years ago while the spreadsheet from 2000 AD, will not exist for two billion years.

      Anonymous Coward:

      (BTW, too bad I don't have some mod points to spend -- Planck units are the perfect rebuttal to those that claim the metric system is the best around)

      Natural units (Planck-Units) are best. After them, Metric Units are second best. One must remember that the metric system predates the discovery of Planck-Constants. The metric system has definite advantages over other previous systems:

      • All units are interrelated
      • The names of the prefixes are powers of ten
      • It is an international standard

      Natural units are too small for practical everyday use. Metric units are in the convenient range for everyday use. Still, it is important to remember that metric units are arbitrary.

      Among my favorite arbitrary units is the byte, system for measuring memory:

      2^10

      This way, the amount of memory a computer can handle is always a round number (because the algorithms used for memory allocation, use binary mathematics). As an example, my filesystem can support files of upto 16 exobytes in size.

    5. Re:Use Planck-Time and 256Bit Integers by Walabio · · Score: 1

      Is it even possible to reliably measure how many units of Planck time pass in a given interval, theoretically or otherwise?

      One cannot directly measure in Planck-Time-Units with current technology. We will have to do that what we already do:

      The quartz-clock in your computer generates many ticks per seconds (let us say 65,536 ticks -- the number of ticks per second varies from quartz-clock to quartz-clock). Your computer divides to seconds. Rather than dividing to seconds, one would multiple to Planck-Time-Units.

    6. Re:Use Planck-Time and 256Bit Integers by Cl1mh4224rd · · Score: 3, Funny
      Planck-Time
      Plank-Time
      placktime
      Apparently there are some flaws with this method... Data degradation being the most obvious.
      --
      People will pass up steak once a week, for crap every day.
    7. Re:Use Planck-Time and 256Bit Integers by Anonymous Coward · · Score: 0

      Yes, but in what frame of reference (London's)? If you're going to get down to Plank units relativity matters!

    8. Re:Use Planck-Time and 256Bit Integers by Nimey · · Score: 1

      With your method, we're not actually measuring Planck time units, but instead "units that are approximately n Planck units long" - you can't get the resolution down that fine.

      --
      Hail Eris, full of mischief...

      E pluribus sanguinem
    9. Re:Use Planck-Time and 256Bit Integers by Anonymous Coward · · Score: 0

      Don't you mean a byte is 2^8, or were you thinking in octal? :)

    10. Re:Use Planck-Time and 256Bit Integers by PetWolverine · · Score: 1

      I propose that zero-time be zero Julian Date.

      As long as we're basing this on physical constants, why have the epoch be based on a human calendar? It should be t=0, the beginning of the universe.

      One consequence of this will be to settle once and for all the question of the age of the universe--we can just define it as something appropriate and convenient.

      --
      I found the meaning of life the other day, but I had write-only access.
  70. Re:Seriously, why can't we fix this damn thing now by Anonymous Coward · · Score: 0

    > Who cares about C++? Blech!

    Yeah, that's a helpful attitude.

    C++ has a huge influence on other languages. Just to take one tiny example (of many), note that PHP inherits its time() function from directly from C/C++, and so it also inherits the same signed 32-bit limitation. Once C++ gets upgraded, then many other languages will follow.

    > "long long" is in the C standard

    The point is that time() still returns a 32-bit value in both C and C++. That's the problem we're trying to solve here.

  71. Re:Seriously, why can't we fix this damn thing now by mabu · · Score: 3, Funny

    In case you haven't figured out, we are now a reactive society as opposed to proactive. We fix things, or usually replace them, when they break, not before. Americans don't think much about the future beyond what's on television later that day.

    Yes, we could fix the bug now. Likewise, we could also address world hunger, the deficit, the exploding crime problem, terrorism and a host of other issues with such cautious, preventative measures, but doing so wouldn't give us the instant gratification we desire now, so we'll let your children deal with the deficit, crime, terrorism, poverty, hunger and the time bug. We have better things to do. I'd write more, but I think "Friends" is coming on.

  72. Re:Seriously, why can't we fix this damn thing now by Anonymous Coward · · Score: 1, Informative

    time() doesn't return a 32-bit value, it returns a time_t. The nature of a time_t is is implementation dependent.

  73. It's already happened. by Draconix · · Score: 1

    I kid you not, I'm not sure when, but my iBook rolled back to 1970. I was copying a document from it, noticed, and wondered if it has been the battery dying or something. I'm glad this cleared up, but I'm not sure why my laptop jumped the gun. :)

    --
    By reading this you acknowledge that you have read it.
    1. Re:It's already happened. by fordboy0 · · Score: 1
      Funny, but it seems that my iMac (snow) seems to enjoy 1970 too. I don't think that it's the aforementioned bug, however; Mine is quite repeatable. All I have to do is unplug it. :) Voila! It's 1970 again and I'm having my first birthday.

      I'll bet that your battery is flaky or perhaps it was just a glitch.

      --
      Ligaguinggligagiggagoogoogwillgo
    2. Re:It's already happened. by Helios292 · · Score: 2, Informative

      Reset your power manager (you can find out how for your specific model on Apple's site), and then leave your 'book to charge fully overnight. Probably just a corrupted pmu setting. It's happened before on mine and many of the ones I worked on back when doing Apple service.

  74. Re:Seriously, why can't we fix this damn thing now by kst · · Score: 2, Interesting

    The point is that time() still returns a 32-bit value in both C and C++. That's the problem we're trying to solve here.

    No, time() returns a time_t value. The C standard defines time_t as an arithmetic type capable of representing times; there's nothing in the standard that says it has to be 32 bits, or that it counts seconds from 1970-01-01, or even that it counts seconds. (I think POSIX imposes some more specific requirements, but it still allows a 64-bit type.)

    I've worked on several systems that already use a 64-bit type for time_t. I suspect that all systems will do so well before 2038.

    If the problem hasn't taken care of itself in 20 or 30 years, then we can start worrying about it.

    (Switching to an unsigned 32-bit type would buy us another 68 years, but it would make it impossible to represent dates before 1970.)

  75. 20 generations by 2034? by wackybrit · · Score: 4, Funny

    You expect to have twenty generations of descendents by 2034? Ooh ooh I got it! You're from Alabama, right?

  76. Re:Seriously, why can't we fix this damn thing now by Anonymous Coward · · Score: 0

    -- Who cares about C++? Blech!

    So in your little corner of the universe, which language is everybody supposed to care about above all others? Let me guess. Perl? Java?

    Please enlighten us with your wisdom.

    And dismissing the whole C++ language with a flick of the pinky is modded up to 2 ???

    ***SIGH***

  77. They seldom run Unix by billstewart · · Score: 1

    Yes, there are Unix versions for them, but it's unlikely that many of them have hacked their date-bits usage to cause problems now, as opposed to waiting till 2038 to get in trouble.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  78. Re:Seriously, why can't we fix this damn thing now by Anonymous Coward · · Score: 0

    > I've worked on several systems that already use a 64-bit type for time_t.

    That's nice, but it's not good enough.

    I should have said that in many implementations of C and C++, time() still returns a 32-bit value.

    You are correct when you say that it can return 64-bits. But the problem is that it's not required to do so. The problem's not fixed until time_t (or its successor) is required to represent dates after 2038.

    Sorry about the misstatement and thanks for pointing out my error.

  79. Grammar police by Anonymous Coward · · Score: 0

    You mean, "If time_t were unsigned". Read up on the subjunctive mode.

    1. Re:Grammar police by Raffaello · · Score: 1

      That's subjunctive mood , not mode.

  80. Actual figures here (in case you wanted to know) by RouterSlayer · · Score: 5, Informative

    If you want to know what the real values are, this article and the one on cnet is wrong in so many ways... ugh, but here are the real ones that will really affect people:

    FreeBSD 2.2.7 will start having this clock problem on January 18th, 2038 at 20:14 (8:14PM) EST when the unix clock on FreeBSD will read: 2147483640,
    20:15 (8:15PM) EST will cause FreeBSDs clock timer to claim an invalid date... joy !

    That's not 2^30 folks, that's 2^31 (2147483648) or about 8 seconds after the time I quoted above.

    I know because we still have one box running 2.2.7 here (and what a fun box it is too!) can't handle more than 128megs of ram. What is this - the dark ages? that was rhetorical... :)

  81. Of course... by BitwizeGHC · · Score: 1

    Of course 64-bit time_t's will theoretically fix all that... that is, until we design computing systems intended to survive the death and hypothetical rebirth of our universe...

    --
    N4st0r, trixx0r h0bb1tz0rz! Th3y st0l3 0ur pr3c10uzz!
    1. Re:Of course... by aardvarkjoe · · Score: 1

      Well, sure, if we keep our timestamps in seconds. But what if we decide that we need microseconds, or nanoseconds ... ?

      --

      How can we continue to believe in a just universe and freedom to eat crackers if we have no ale?
    2. Re:Of course... by Anonymous Coward · · Score: 0

      Then you're too uptight. In my new OS time is stored as a character buffer.

      The last time I got laid: "A long time ago"
      The next time I'll get laid: "A long time from now"

      Sure, maybe it's not accurate to the nanosecond, but it still relates the crushing reality to me perfectly.

      I based software for simulating nuclear events on the magic 8-ball: "Outlook not so good"

  82. Tom Ridge must know something we don't by orty.com · · Score: 1
    I blame the heightened alert on this bug. It's y2k all over again.

    Excuse me while I go make sure my Javascript that counts down until the end of the world is up to snuff.

    [/sarcasm]

    --
    Ignoranus: A person who is both stupid and an asshole.
  83. A few problems... by Anonymous Coward · · Score: 0

    The KDE newsreader Knode stored and sorted timestamps as a string, so messages after the rollover (1xxxxxxxxx) were sorted before messages before the rollover (9xxxxxxxx). It was fixed fairly quickly.

  84. I have one! by soloport · · Score: 5, Funny

    I shorted A31 to ground with a screwdriver on my Motorola MC68060 board. It blew a pullup resistor on an open collector output driver. Now A31 is always low -- and I'm too lazy to replace the tiny little 100 ohm surface mount. It runs just fine as long as I don't address high memory.

    I just want to know: Does that count?

    1. Re:I have one! by A+nonymous+Coward · · Score: 1

      I just want to know: Does that count?

      Not into bit 31 it doesn't.

  85. Re:Seriously, why can't we fix this damn thing now by Anonymous Coward · · Score: 0

    "the exploding crime problem"

    I don't know where you are, but in the U.S. crime rates, especially violent crime, have been going down for the last 10 years. You wouldn't know it from watching the news, though.

  86. sounds good to me by m3rr · · Score: 1

    would it be so bad for us to all just pretend it's the 70s again?? it might be fun.

  87. hehhe by Anonymous Coward · · Score: 0

    There's your sign....

  88. I'm going into my bunker by JFMulder · · Score: 1

    Tell me when the apocalypse is over.

    1. Re:I'm going into my bunker by JM+Apocalypse · · Score: 1

      Err .... now.

      --

      - - - - - - -
      Orppf urp mf y.ppcxn. yflcbi otcnnov C am yflcbi yr n.apb Ekrpatv (Dvorak -> Qwerty)
  89. two words by Anonymous Coward · · Score: 0

    John Titor. Do a google search on him. Pretty interesting, and not completely unrealated.

  90. On OS X 10.3.2 by CODiNE · · Score: 1

    sh-2.05b$ ./2038.pl
    Tue Jan 19 03:14:01 2038
    Tue Jan 19 03:14:02 2038
    Tue Jan 19 03:14:03 2038
    Tue Jan 19 03:14:04 2038
    Tue Jan 19 03:14:05 2038
    Tue Jan 19 03:14:06 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    sh-2.05b$ uname -rs
    Darwin 7.2.0
    sh-2.05b$ perl -v

    This is perl, v5.8.1-RC3 built for darwin-thread-multi-2level

    Sticks at the limit here too.
    -Don.

    --
    Cwm, fjord-bank glyphs vext quiz
    1. Re:On OS X 10.3.2 by ce25254 · · Score: 1

      Somehow I think OS X will be well into 64 bits by 2038, considering the release of the G5 this year.

      Of course, some people are still using very old Macintosh computers (seems to be a trend with Mac users), so I guess it's possible that there will be someone in 2038 holding onto his blue + white G3 for dear life!

  91. Sure, but index as binary? by tjstork · · Score: 1


    It's not storing as text that kills big databases, its the lack of indexing.

    --
    This is my sig.
  92. Umm, none? by thebes · · Score: 0

    There can't exist a binary system with a 29 or 31 bit word. Given the nature of binary, you can have words based on multiples of 8 bits (and sometimes 4 bits such as a nibble (4 consecutive bits)). You may be thinking of when you are counting the registers in a CPU or the columns in a memory where you would start with %r0 and go to %r31 plus the extra registers in an ARC CPU for example.

    Just thought I'd help you clarify a few things.

    1. Re:Umm, none? by tjb · · Score: 3, Interesting

      Yes you can. You can define a binary system with however many bits you like. It may not look pretty in a hexadecimal representation, but there's no reason you can't do it.

      In fact, I work on a processor in which one engine has 20 bit words, another has 18 bit words, and another does multiplies out to 29 bits (15 bit x 14 bit).

      Tim

    2. Re:Umm, none? by EvanED · · Score: 1

      As tjb said, there's nothing preventing you from using a "weird" sized word. I could give you a VHDL model of a simplified version of a MIPS from a computer archetecture class that I can modify to use, say, 37 bit words if you don't oUeve me.

    3. Re:Umm, none? by RetroGeek · · Score: 1

      Given the nature of binary, you can have words based on multiples of 8 bits (and sometimes 4 bits such as a nibble (4 consecutive bits)).

      You can have words on powers of 2, given the nature of the binary system. Though a 2 bit computer would be rather limited.

      And you mis-spelt Nybble. :-))

      --

      - - - - - - - - - - -
      I am a programmer. I am paid to produce syntax not grammar. Deal with it.
    4. Re:Umm, none? by haxorest · · Score: 3, Funny
      Though a 2 bit computer would be rather limited.

      So just what kind of a two-bit operation are you running here?

    5. Re:Umm, none? by Fembot · · Score: 1

      He told me it was a huge step forward from the 1 bit computer he sold me last year :-(

    6. Re:Umm, none? by RetroGeek · · Score: 1

      So just what kind of a two-bit operation are you running here?

      0 0
      0 1
      1 0
      1 1

      --

      - - - - - - - - - - -
      I am a programmer. I am paid to produce syntax not grammar. Deal with it.
    7. Re:Umm, none? by Anonymous Coward · · Score: 0

      NEWBIE!! Or maybe just a plain old dope, lulled by the dominance of common architecture into thinking there is only one true way of doing things.

      How many remember the PDP8E, with 12 bit words?

      Swell machine, great for data capture. I used to program them for the Chem Department at the university.

      Ah, the smell of paper tape in the morning. I can still toggle the boot sequence into the front panel to boot from paper tape.

      Last time I checked, one could still get this architecture in a single chip, with memory, IIRC.

      Just last year, I sat on the architecture committee of a group reviewing the design of a CPU with 103 bit words.

  93. My clock drifts so bad... by incom · · Score: 1

    It's in mid 2005 right now. And I set it to the correct time last week. Stupid taiwaneese motherboards.

    --
    True genius is grasping a situation like a peice of fruit, and peircing it just right so that it drains dry.
    1. Re:My clock drifts so bad... by Anonymous Coward · · Score: 0

      All motherboards drift, especially if you overclock.

      And why aren't you using NTP?

  94. Actually... by Kjella · · Score: 2, Insightful

    Its interesting, how no one considered this would happen eventually and just started to use 64 bit ints to store this from the long run.

    Well, considering how it was the 70s, the change of the millennium seemed ages away, 32 bit seemed a *lot* of memory back in those days. Think a small database with 64 vs 32 bit timestamps. My dad used to work in IBM way back, and I remember he's told me about a printing company which turned down getting another mb of mainframe memory from them, because it'd cost them $150,000. That's 50 cents extra per date.

    If I remember my history right, it was one of the Apple developers that in the design process cut two digits from the year, in order to save memory. Since they were trying to make a consumer product (or at least consumer-priced product), even more work went into minimizing cost. This was also in the 70s. The IBM PC just copied that system.

    Today, it seems utterly stupid to not double it. Just understand that today the machines have literally thousands of times more RAM than they used to. It was a real scarce resource, where every bit counted. Nobody was thinking of year 2038, they were thinking of how this would improve performance right here and now. Also at the time, computers were mostly big mainframes, with pretty much specialists and geeks. So they probably thought it'd be easy to fix when the issue arised.

    That they were mostly unable to foresee the explosion of a) the personal computer, b) the Internet and c) embedded electronics before the end of the millenium, is hardly anything you can blame them for. It wasn't really until near the very end of the millennium that people really understood the magnitude of the task. That's why the y2k-problem became such a big thing, if it had been some mainframes in a computer lab somewhere, noone would have lifted an eyebrow. It was that "the computers are everywhere, in all offices, they'll all go to hell, and society will collapse" which made it big. At which point it was a little late to fix the underlying format, since so much code relied on it being of that type.

    So if there was a time, it'd have to be the middle time... after memory got "cheap", before too much code started to rely on it. It's hard to say if such a period even existed. And even if it did, I'm sure 99,9% of the people would have wondered why the fsck you need to fix that issue NOW. The old system works, and will work for many years yet (like, long past the life time of this PC. We can fix it in the next one). Don't knock it if it works, right? So I find it quite natural it turned out the way it did, no matter how smart people were.

    Kjella

    --
    Live today, because you never know what tomorrow brings
    1. Re:Actually... by Hes+Nikke · · Score: 1

      If I remember my history right, it was one of the Apple developers that in the design process cut two digits from the year, in order to save memory. Since they were trying to make a consumer product (or at least consumer-priced product), even more work went into minimizing cost. This was also in the 70s. The IBM PC just copied that system.

      FYI, no apple of the 1970s stored the date. the Macintosh (or possibly the lisa, i don't know) stored it's date as an int just like unix, but the epoch started in 1900 of the local time zone.

      when the mac moved to Mac OS X things got complicated, because the NVRAM is still storing based on the 1900 epoch, but the OS is using the 1970 epoch.

      --
      Don't call me back. Give me a call back. Bye. So yeah. But bye our, well, but alright we are on a shirt this chill.
  95. Your company is going to faill by geekoid · · Score: 0, Offtopic

    unless you hire ME! CNET said so.

    --
    The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
  96. the arithmetic? by jqh1 · · Score: 2, Informative

    It will soon be about 2^30 (1 billion, not 2 billion) seconds since 1970 (do the arithmetic).

    It's not a billion seconds, it's 1,073,741,824 seconds -- right?

    and we are close:

    perl -e "print time();"
    1072061932

    1 365 day year is 60*60*24*365 = 31,536,000
    seconds.

    there are 8 leap years in there, and probably a few leap seconds, sure, but:

    1,000,000,000 / 31,536,000 = 31.70979 years to hit 1 billion seconds.

    1970 + 31.7 years puts us in September 2001. Randall Schwartz called this event U1E9 (unsigned 10 to the 9th power?) - there were a few glitches (mostly sorting related), but I've still got all my canned goods and batteries.

    --
    who's moderating the meta-moderators?
    1. Re:the arithmetic? by Anonymous Coward · · Score: 0
      1970 + 31.7 years puts us in September 2001. Randall Schwartz called this event U1E9 (unsigned 10 to the 9th power?)

      U1E9 nevar forget.
  97. Salvation For Loveless Geeks? by shadowcabbit · · Score: 3, Funny

    A girl once told me she wouldn't go out with me until the end of time.

    Sally Roberts, pucker up.

    --
    "Why Subscribe?" Good question...
    1. Re:Salvation For Loveless Geeks? by Wolfrider · · Score: 1

      --Listen to Meat Loaf's "Paradise by the Dashboard Light" sometime.

      --There are worse things than merely not going out with the wrong girl...

      --
      .
      == WolfriderV6 == I'm willing to admit that *I just might* be wrong... Are you??
  98. When becometh Friday the Thirteenth by Skapare · · Score: 4, Informative

    Actually UNIX is really using an effective 31 bits because of the fact that it defaults to a signed quantity, and hence the highest order bit is really a sign bit. So when the clock finally increments 0x7FFFFFFF (19 January 2038 03:14:07) to 0x80000000 the time will wrap back to 2,147,483,648 seconds before 1970, e.g. instead of being Tuesday 19 January 2038 03:14:08, it suddenly becomes Friday the Thirteenth (specifically Friday 13 December 1901 20:45:52).

    Those systems that are using an unsigned 32 bit time value can go on until Sunday 7 February 2106 06:28:15.

    If we were to switch to 64 bits, we could use a resolution of nanoseconds with all that extra space and still represent time until Friday 11 April 2262 23:47:16.854775807 before the sign bit becomes an issue (and negative values can represent time back to Tuesday 21 September 1677 00:12:43.145224192).

    --
    now we need to go OSS in diesel cars
    1. Re:When becometh Friday the Thirteenth by superwombat · · Score: 1

      I was going to put this date in my Tungsten C but its not letting put in events after 2031. doh!

  99. Stupid computers by Anonymous Coward · · Score: 0

    And when all the stupid computers which represent numbers in 30 bits catch fire and explode when the numbers overflow (just like y2k, remember when all the banks went crazy as their unpatched computers exploded and the software maintainers suddenly had thousands more dollars appear in their bank accounts by accident), we can all laugh that much harder about how many bits they used to store a number.

  100. scroller... by frostman · · Score: 1

    Wow, I opened that in a background tab in Firebird, figuring I'd get a chuckle when I was done with Slashdot.

    Then about ten minutes later I notice the scrolling status bar on my Slashdot tab:

    Are YOU prepared for an emergency? How about for Y2K?

    My first though was that someone had brilliantly hacked the comment system to include javascript... then I remembered the Firebird "feature."

    --

    This Like That - fun with words!

  101. Watch it on a shell near you! by Dwonis · · Score: 1

    watch -n1 'python -c "import time;print hex(int(time.time()))"'

  102. That's what you get from loading Windows.... by Anonymous Coward · · Score: 0

    A 32-bit patch to a 16-bit interface running on top of an 8-bit OS written for a 4-bit microprocessor by a 2-bit company that can't stand one bit of competition.

  103. You, sir, are incorrect by siskbc · · Score: 5, Funny
    This is the biggest computer-related time event since Y2K, which begun on January 1, 19100!

    In standard /. fashion, I will overlook factual inaccuracies in the interest of pursuing my goal of correcting everyone's grammar. As such, I must tell you that Y2K *began* on January 1, 19100.

    --

    -Looking for a job as a materials chemist or multivariat

    1. Re:You, sir, are incorrect by 56ker · · Score: 1

      The title of your reply reminds me of the Simpson's episode with the Southern gentleman who accepted Homer's challenge of a duel.

    2. Re:You, sir, are incorrect by stephens_domain · · Score: 2, Funny

      You want to correct everyone's grammar on slashdot?

      I've heard some lofty goals, but this goes to a whole new level.

      --

      ..
    3. Re:You, sir, are incorrect by Smelly+Jeffrey · · Score: 2, Insightful

      Y2K began on January 1, 19101

      Let:
      Y2K == "year two-thousand"
      19100 == 2000
      19101 == 2001.

      You mean to tell me that the "year two-thousand" began on January 1, 2001?

    4. Re:You, sir, are incorrect by jargoone · · Score: 1

      You know, it sucks, but I realized I used the wrong verb tense after I submitted the post. I salute you for making an attempt to educate the readers. Thank you!

    5. Re:You, sir, are incorrect by Anonymous Coward · · Score: 0

      Yeah, that's unpossible!

    6. Re:You, sir, are incorrect by zcat_NZ · · Score: 1

      Nobody really cares when the millenium began or ended, the year 2000 began on Jan 1, 2000.

      Or if you screwed up the bugfix it began on 1/1/1900, 1/1/2100, 1/1/20100, 1/1/19100, or any of several other amusing variations.

      --
      455fe10422ca29c4933f95052b792ab2
    7. Re:You, sir, are incorrect by Richard_L_James · · Score: 1

      Y2K *began* on January 1, 19100^H^H^H^H^H *1910* .

      That's better !

    8. Re:You, sir, are incorrect by Anonymous Coward · · Score: 0

      >Y2K *began* on January 1, 19100^H^H^H^H^H *1910* .
      >That's better !

      You don't think you missed the point, then?

    9. Re:You, sir, are incorrect by adz · · Score: 1

      Actually as the year 19100 is over 17000 years in the future, Y2K *will begin* on January 1, 19100.

    10. Re:You, sir, are incorrect by Directrix1 · · Score: 1

      Yeah I was thinking the same thing. But in all actuality y2k began on January 1, 19A0. Thats what it read in an old program that I had to rapidly code a replacement for down here.

      --
      Occam's razor is the blind faith in the natural selection of least resistance and in universal oversimplification. -- EF
  104. ahh yes, the 70's by geekoid · · Score: 1

    When you could only rent your phone from Ma Bell
    And it had to be pluged into the wall
    and it didn't have any buttons for dialing.

    And the grocery stores still had tube testers.
    And the TVs had 'knobs', and 7 channels.

    And every place was filled with cigerette smoke.

    The pollution in LA was twice as bad as it is now.

    And some jerk made a movie that has me afraid of sharks to this very day.

    OTOH,
    Man was landing on the moon, gas was less then a buck, and he romones where just getting going.

    DnD was giving nerds something to do between poundings at school, and Star wars told everybody Sci.fi didn't have to be cheesy.

    I rode my first wave, had my first kiss, and learned never, ever, EVER, give cheese cake to a dog.

    --
    The Kruger Dunning explains most post on /. http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect
  105. Need Binary Clock by Keith+McClary · · Score: 1

    I Need a Binary Clock so I can watch it turn over on Jan. 10.

    Any suggestions?

    1. Re:Need Binary Clock by Anonymous Coward · · Score: 0

      Thinkgeek has one I think.

      Better: Find a normal digital clock and see if you can bypass the BCD converter (chip). So much more interesting that way.

  106. Did the math. by Anonymous Coward · · Score: 0

    Since January 1, 1970 At 00:00:00, 30 bits worth of seconds brings us to January 9, 2004 1:37:04 AM. OOOOhhhh. Am I supposed to worry, or should I concern myself with replacing my 32 bit computer within another 34 years, 9 days, 1 hour, 37 minutes and 4 seconds (when the 31'st bit flips), or should I *really* worry in 68 years, 18 days, 3 hours and 14 minutes when the last bit flips (assuming unsigned integer)?

  107. Example by dtfinch · · Score: 1

    ICQ clients used to crash instantly if you set your clock past 2038.

  108. SCO... by JebusIsLord · · Score: 1, Redundant

    Well, someone check their kernel source to see if SCO is going to flake out... ...we are apparently in possession of their sources, after all :)

    --
    Jeremy
    1. Re:SCO... by Negative+Response · · Score: 1

      I am kind of sick of these SCO jokes (pardon me for the beer I had in the past two hours), honestly it's too cheap, at least to me, to make jokes abour SCO regardless of the context. If SCO lied (I believe they did) it's ok to laugh at them DIRECTLY, but this kind of sniping does not contribute to the effort of battling evilness. It only smears the image of OSS community. Wanna fight them? Write some editorial or something like on groklaw, say it out straight. What you do on slashdot is no better than mere rumors and gossips. Regard, and again please pardon my beer. European beers are evil, you know. Yours, Negative Response

  109. Time is complex... by Goonie · · Score: 4, Informative
    Recording times accurately can get very complex in some cases, and longer time_t's aren't the whole solution.

    Firstly, every so often a leap second is added to UTC. For this reason, over timescales of years it is impossible to exactly map unix time_t and calendar times.

    Another issue is determining when a transaction happened that occurred across multiple time zones...

    --

    Any sufficiently advanced technology is indistinguishable from a rigged demo
    --Andy Finkel (J. Klass?)
    1. Re:Time is complex... by p3d0 · · Score: 1

      To clarify: leap seconds are a problem in the future, not the past. For the past ones, you need a database of when they occurred, which is a hassle, but it's possible. For future ones, you're hosed, because nobody can predict when they will be needed. (They depend on tiny perturbations of the earth's rotation.)

      --
      Patrick Doyle
      I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
  110. Duh, it can! by multipartmixed · · Score: 4, Funny

    > I think it'd be much nicer if the language could handle Perl-style returning of arrays.

    The guy who posted above you 8 minutes earlier already understood the solution: return a damned pointer!

    Why, oh why, is this so hard to understand? Here, I will provide a contrived, stupid example.

    #define MIN_CHEST 25 /* waif, indeed! */
    #define MAX_CHEST 55 /* no jogging allowed */
    #define MIN_WAIST 19 /* guiness record */
    #define MAX_WAIST 65 /* doorway limitation */

    typedef enum { brown, blue, red, blonde, blue, cmax } colour_t;

    typedef struct
    {
    char *name; /* name of girl */
    size_t waist; /* diameter of waist */
    size_t chest; /* diameter of chest at most interesting offset */
    size_t hips; /* measure are the hips, don't get distracted, you naughty tailor */
    colour_t hair; /* it's good to hold on to! */
    colour_t eyes; /* if they can't see it, they can't suck it */
    } girl_t;

    typedef struct
    {
    size_t count;
    girl_t *girls;
    } girl_array_t;

    void mempanic()
    {
    write(STDOUT_FILENO, "oh oh\n", 6);
    _exit(1);
    }

    girl_t *createAllGirls()
    {
    girl_array_t *girlArr = calloc(sizeof(*girlArr), 1);
    char name[64];
    size_t waist, chest, hips;
    colour_t hair, eyes;

    if (!girlArr)
    mempanic();

    for (waist = MIN_WAIST; waist girls = realloc(girlArr->girls, sizeof(*(girlArr->girls)) * (girlArr->count + 1));
    if (!girlArr->girls)
    mempanic();
    sprintf(name, "chick #%i", girlArr->count + 1);
    girlArr->girls[girlArr->count].waist = waist;
    girlArr->girls[girlArr->count].chest = chest;
    girlArr->girls[girlArr->count].hips = hips;
    girlArr->girls[girlArr->count].eyes = eyes;
    girlArr->girls[girlArr->count].hair = hair;
    girlArray->count++
    }
    return girlArray;
    }

    There. Everything you need. A single return value, a dynamic sized array of structs. And girls.

    Of course, I didn't test it. But if you really need girls that bad, let me know and I'll make sure it builds.

    Now, this is just some text to avoid the lameness filter. Doo dah. Tobacco use during pregnancy increases the risk of preterm birth. abies born preterm are at an increased risk of infant death, illness and disability. Health Canada.

    L'usage du tabac pendant la grossesse accroit le risque d'un accouchement premature. Les bebes prematures font face a des risques plus grands de mort infantile, de maladies et d'incapacites. Sante Canada.

    Okay. Maybe I'll de-indent my code. Stupid piece of shit.Meta-control-Q should fix that.. Oh great! Now I need more characters per line. Comments, here I come...

    --

    Do daemons dream of electric sleep()?
    1. Re:Duh, it can! by Anonymous Coward · · Score: 0
      char name[64];
      ...
      sprintf(name, "chick #%i", girlArr->count + 1);
      ...
      return girlArray;

      Unless you individually allocate memory for the "name" pointer in each structure (perhaps somewhere where the post was cut off), this looks like it's returning a pointer into the function's stack. But anyway, the structure of the thing is what's important.

      This might be fine for use within your own program, but it does not work for a kernel interface.

      How is the kernel supposed to "allocate" memory for a user program and then return a pointer to that? A given userland program may be using any version of a C library with incompatible malloc implementations, if it even uses a C library. Structures passed from kernel to userland do not contain various pointers to other structures; the memory that the kernel writes into has to be passed in by the userland program. If you really want to pass complex structures from the kernel, you could have the call pass in a large memory buffer and then all the various structures, arrays, etc, are allocated only within that buffer. Windows does this in various places and it quickly gets out of hand: it's a bad interface.

      So this solution isn't really applicable to a kernel interface. A very simple kernel interface that will solve all these time problems is:

      int time64(long long *t);
      Now your code might be meant for use within userland programs and libraries. However, the userland programs and libraries that I know of that only have 29 bits of integer available are things like lisp interpreters that use the extra bits to determine whether something is an integer or a pointer to a dynamically-allocated object (one presumes the implementations of arithmetic operations check for overflow to avoid blowing away those bits and to automatically promote an integer to an object when needed). There is no way one can write one of these systems without knowing dynamic memory management (a very basic, first-year CS subject).

      So I'm not sure what this code is supposed to address. It doesn't fix the kernel time_t problem and this stuff isn't new to those systems I know of that will have problems with 29-bit dates.

    2. Re:Duh, it can! by BorgCopyeditor · · Score: 1

      Man, that code is seriously built!

      --
      Shop as usual. And avoid panic buying.
  111. FreeBSD rolls back by Wee · · Score: 1

    > ./2038.pl
    Tue Jan 19 03:14:01 2038
    Tue Jan 19 03:14:02 2038
    Tue Jan 19 03:14:03 2038
    Tue Jan 19 03:14:04 2038
    Tue Jan 19 03:14:05 2038
    Tue Jan 19 03:14:06 2038
    Tue Jan 19 03:14:07 2038
    Fri Dec 13 20:45:52 1901
    Fri Dec 13 20:45:52 1901
    Fri Dec 13 20:45:52 1901
    > uname -sr
    FreeBSD 4.6.2-RELEASE-p23

    -B

    --

    Ash and Hickory, straight-grained and true, make excellent bludgeons, dandy for the cudgeling of vegetarians.

  112. of course by SHEENmaster · · Score: 1

    Both use signed integers! They must have a common heritage. It's called the POSIX spec.

    Next, they'll accuse Linux of plagurizing the six lines of "return -EFAULT" that occur in kernel/time.c of the 2.4.22 kernel because they are so similar to a few "return -1" lines of SCO's UNIX93-compliant pride and joy.

    If anyone is starting a pool for the end of the world, put me down for Tue, 19 Jan 2038 03:14:07.

    --
    You can't judge a book by the way it wears its hair.
  113. IEEE Floating Point by Detritus · · Score: 1

    Integers are represented exactly in IEEE floating point as long as they do not exceed the size of the mantissa. Many systems do not provide 64-bit integers. The trick is to use the correct base unit. For time, I've often used elapsed microseconds since the epoch. For money, you can use cents or millicents, depending on how you want to round things.

    --
    Mea navis aericumbens anguillis abundat
  114. Darwin's screwed too by flamingweasel · · Score: 1

    Hope I get an update before 2038....

    [ryan][~][15:152B][0] perl 2038.pl
    Tue Jan 19 03:14:01 2038
    Tue Jan 19 03:14:02 2038
    Tue Jan 19 03:14:03 2038
    Tue Jan 19 03:14:04 2038
    Tue Jan 19 03:14:05 2038
    Tue Jan 19 03:14:06 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    [ryan][~][15:152B][0] uname -rs
    Darwin 7.2.0

    --
    Cthulhu loves you.
  115. Re: Affect vs Effect by some+guy+I+know · · Score: 1
    'Effect' means the result of some 'affection'.
    "Effect" the noun means "the result of some affection".
    "Effect" the verb means "to cause".

    For example: "The effect affected him such that it effected his defection from his affection toward her defective affectation for reflective detective stories".
    --
    Those who sacrifice security to condemn liberty deserve to repeat history or something. - Benjamin Santayana
  116. Different reply with 2.4 kernel on PPC by stere0 · · Score: 1

    It just stays at the limit on 2.4.21 with perl 5.8. The expression at the bottom properly rolls back though. Any idea of why the parent is rolling back to 1901? Shouldn't it roll back to 1970?

    % perl 2038.perl.txt
    Tue Jan 19 03:14:01 2038
    Tue Jan 19 03:14:02 2038
    Tue Jan 19 03:14:03 2038
    Tue Jan 19 03:14:04 2038
    Tue Jan 19 03:14:05 2038
    Tue Jan 19 03:14:06 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    % uname -a
    Linux Hertz 2.4.21-xfs #1 Mon Sep 1 17:17:44 CEST 2003 ppc GNU/Linux
    % perl -v

    This is perl, v5.8.0 built for powerpc-linux-thread-multi
    [...]

    % perl -e 'print scalar gmtime 1e10, "\n"'
    Wed Dec 31 23:59:59 1969

    --
    Trollem mirabilem hanc subnotationis exigiutas non caperet
    1. Re:Different reply with 2.4 kernel on PPC by YetAnotherLogin · · Score: 1

      1970 is merely the zero. Remember that time_t uses signed integers, hence when it rolls back (if it does) it rolls back to the "largest" negative number, not back to zero.

  117. Not a problem by davidstrauss · · Score: 1

    Didn't we just begin the fourth age a few days ago? We should have awhile.

  118. ATTENTION! by Anonymous Coward · · Score: 0

    You're dumb.

  119. Re: Affect vs Effect by Anonymous Coward · · Score: 0

    "The effect affected him such that it effected his defection from his affection toward her defective affectation for reflective detective stories".

    The period goes before the end quotation, you dumbass!

  120. TAI by Detritus · · Score: 2, Interesting

    UTC is a mess. I'd rather see all computer clocks use TAI (International Atomic Time) internally.

    --
    Mea navis aericumbens anguillis abundat
    1. Re:TAI by vidarh · · Score: 1
      It wouldn't help you at all. UTC is derived from TAI by the use of leap seconds. Computer clocks aren't exact enough to follow TAI continuously (if you notice, they don't even trust a single atomic clock, but calculate it from accumulated data from more than 200), the result being that the computer clocks would also end up being adjusted by adding or temporarily slowing down the clock (even worse than UTC...) to keep in sync with TAI.

      There's no point in taking the cost of making a regular PC measure time that exactly - it would add to the cost for no preceptible benefit for almost anyone using them.

  121. My Y2K Story (A little offtopic) by LouisvilleDebugger · · Score: 4, Funny

    The Y2K preparedness team at my company went crazy over the hype. They set up a big "Y2K Command Center" (commandeered a big teleconferencing room) with PCs full of nothing but Excel spreadsheets with all the functionality metrics for our whole enterprise painstakingly listed. Every ten minutes, all of us in the trenches were supposed to telephone this "command center" so they could update their spreadsheets (yes, web site "foobar" is still responding, yes, this database still works.)

    About 30 minutes before Y2K hit our time zone, I noticed the maintenance guys firing up the big diesel backup generators in our rear parking lot. I asked my boss about it. "Oh yeah," he said, "They're going to take us off the power grid just in case." No big deal to us: we have UPS's on all our PCs, and the power fails over all the time in the always-spectacular Kentucky summer thunderstorm season. (Half of the building's lighting turns off to conserve power, everyone slightly gasps, but keeps working...we're used to it.)

    But not so for the "Y2K Command Center." The "suits" had plugged all their spreadsheet-running PCs straight into the wall, and when we changed over to the generators (on their command) the momentary power drop caused *every single one* of their machines to go down....

    We laughed in their faces openly. If that's not being hoist by one's own petard I don't know what is. It almost made it worth it not to be kissing my sweetie on New Year's Eve.

  122. Sounds like bug fixin time... by Anonymous Coward · · Score: 0


    I can see it now:

    Company: We need to get these bugs fixed in short order.
    me: Go screw. Why don't you go outsource the bug fixes to India? ;)

  123. That would be the New Millinium by Kevin_Peters · · Score: 1

    The new Millinium began Jan. 1, 2001. The year 2000 mearly ended the second millinum.

    --
    The music is all around us. I can hear it. Can you?
    1. Re:That would be the New Millinium by yngv · · Score: 1

      I... MARRIED.. A CAKE!!!

  124. Re: Tag bits in integers by some+guy+I+know · · Score: 2, Informative

    Not to be too pedantic or anything, but to use your shift right scheme for extracting integers, the second-to-LSB must be zero (naught) for even numbers, and 1 for odd numbers (in a two's comp machine).
    So the tag bits have to be 00 or 01 for even integers and 10 or 11 for odd integers.

    Some implementations of LISP go even further, using additional bits in the non-integer case.
    For example:
    0 - Upper 31 bits are signed integer (even or odd).
    001 - Mask to get pointer to object, 8-byte aligned.
    011 - Upper 29 bits are index into cons table.
    101 - Upper 29 bits are index into string table.
    111 - etc.

    I seem to recall that Scheme, a LISP dialect, uses this type of tortuous mechanism to extreme extent.

    --
    Those who sacrifice security to condemn liberty deserve to repeat history or something. - Benjamin Santayana
  125. Orange Alert by Entropy_ajb · · Score: 5, Funny

    Maybe this is what the Orange Alert is about.....

  126. Easier way... by jtdubs · · Score: 1

    If you have BSD's date instead of GNU's then try:

    $ date -u -r $((1 30))
    Sat Jan 10 13:37:04 GMT 2004

  127. Example? by R-66Y · · Score: 1

    I think this happened to the Vegas.com sports betting lines page. Only thing is that that page has been like that for several days. *shrug*

    Later,
    Patrick

  128. Re:Seriously, why can't we fix this damn thing now by EyesOfNostradamus · · Score: 1
    Likewise, we could also address world hunger, the deficit, the exploding crime problem, terrorism and a host of other issues with such cautious,

    Odd that you mention terrorism. On Y2K, police uncovered a plot to blow up space needle. Similar incidents were feared around NYC Times Square, and other high profile locations.

    And everybody knows what happened two days after the rollover to 1000000000 seconds.

    And even, right now, terror threat level is at its highest since second 1000215900...

  129. It's the terrorists! by gt25500 · · Score: 1

    Time runs out. H-Bomb crap released or something. Orange alert level.

    It's totally terrorist related ;[ Teh end :(

    --
    _________ Help me get a PSP!
  130. CDs already handle a case you missed by rufusdufus · · Score: 1

    Some filesystem standards include a field for location as well as date and time; usually this is the offset from GMT. Even in today's macroscopic time terms this is a useful way to keep track of when a file was *actually* created or modified.

    If you are going to be keeping track of time down to the plank scale, wouldn't you also need to keep track of location for that precision to mean much?

  131. I love that site!! by xintegerx · · Score: 1

    G. G. Surdu
    Global Year 2000 Program Manager
    Ford Motor Company


    If he's a manager, there must have been other people he was managing. That makes about a dozen people, globally, worrying about a microprocessor THAT DOESN'T EVEN SUPPORT CALENDAR FUNCTIONS. You might as well be the Global Year 2000 Program Manager for bottled water... So, I bet if you look up that guys resume, he left no trace of this stint!!

  132. Not quite accurate by SoupaFly · · Score: 2, Informative
    2^30seconds / 60seconds/minute / 60minutes/hour / 24hours/day / 365.242199days/year = 34.025551925361years

    Actually, there are approximately 86,400.002 seconds in a day (see here). In addition, you neglected to add the leap seconds that may or may not be required.

    I'm just sayin', if you're going to try and be ultra accurate, then don't half-ass it.

    1. Re:Not quite accurate by Dahan · · Score: 3, Interesting
      I'm just sayin', if you're going to try and be ultra accurate, then don't half-ass it.

      Taking into account leap seconds:
      env TZ=/usr/share/zoneinfo/right/GMT date -r 1073741823
      Sat Jan 10 13:36:41 GMT 2004

      Ignoring leap seconds:
      env TZ=/usr/share/zoneinfo/posix/GMT date -r 1073741823
      Sat Jan 10 13:37:03 GMT 2004

      (BSD date's -r option is useful sometimes)

    2. Re:Not quite accurate by ticklemeozmo · · Score: 1

      Sat Jan 10 13:36:41 GMT 2004
      Sat Jan 10 13:37:03 GMT 2004

      So, it depends on if I'm 1337 or not?

      (or, choose your funniest joke)

      If the world does end at 13:36, then the 1337 won't inherit the earth?


      Hey, I'm tryinG :)

      --
      When modding "Informative", please make sure it both has a source and IS actually informative.
    3. Re:Not quite accurate by PacoCheezdom · · Score: 2, Funny

      13:37 in the afternoon, huh?

      Saturday, January 10, some big iron datacenter in Silicon Valley
      Tech: What's this? ERROR 2393: HAXX0rS HAEV STOELN YUOR MEGAHURTZ!


      I love you Jeff K.

  133. Ahem by Anonymous Coward · · Score: 0

    I've heard some lofty goals, but this goes to a whole new level.

    I think you mean:

    I've heard some lofty goals, but this goes to a whole 'nother level.

    ^-^

  134. Re:Seriously, why can't we fix this damn thing now by JamesO · · Score: 1

    No, let's not - I'm planning to spend the last couple of years before I retire making silly money fixing old C/C++ programs to work with longer time_t . It's my pension dammit!

  135. Moreau's Hybrids. by Grendel+Drago · · Score: 1

    Dude, everyone knows that the Martians were wiped out by Dr Moreau's anthrax-based hybrid virus. Oh, sure, all the Martians officially died of "the common cold", and all those Londoners officially died of Martians, but who are you going to believe, the British or your latest edition of the "League of Extraordinary Gentlemen" penny-dreadful picturebook?

    --grendel drago

    --
    Laws do not persuade just because they threaten. --Seneca
  136. Re:Seriously, why can't we fix this damn thing now by Eric+Smith · · Score: 1
    So in your little corner of the universe, which language is everybody supposed to care about above all others? Let me guess. Perl? Java?
    In either Perl or Java, or in many other languages (Ada, Eiffel, Modula 3, Python, Sather, Scheme,and Smalltalk, to mention only a few), the language actually cooperates in helping the programmer write robust software. With C, the language doesn't actively impede such an effort, but it doesn't offer any assistance either. C does make a few minor concessions to robustness, but not much in comparison to better languages.

    C++ does have some good features buried in the morass (mostly features copied from Ada, and sometimes given new names), but it still inherits all of the weaknesses of C.

    C isn't a high-level language; rather it is a portable assembler. C++ is a fancier, object-oriented portable assembler.

    There's a place for C, in writing code for very small embedded systems (perhaps under 16K of memory). IMNSHO, it is only a mediocre language for writing operating system kernels, and a terrible one for writing applications. Ada, Modula-3, Sather, and similar languages are quite suited for writing kernels, and many more languages are well suited for applications programming.

    C++ seems well-suited for not much of anything. I have yet to find any convincing argument that C++ is the best-suited language for any particular purpose. The only thing it seems to have going for it is popularity, and one shouldn't confuse popularity with merit.

    And dismissing the whole C++ language with a flick of the pinky
    Oh, that it should be that easy!

    Eric Smith (who writes C and sometimes C++ code for a living, sigh)

    Software Reliability: Don't Use the Wrong Tools

    Obligatory C++ quotes:

    C++ is a fairytale language. Unfortunately, the fairytale is not The Goose that laid the Golden Eggs, but rather The Emperor has no Clothes.
    -- Peter van der Linden

    C++ is already too large and complicated for our taste.
    -- X3J16, (SIGPLAN notices, June 1992)

    C++ will do for C what Algol-68 did for Algol.
    -- David L. Jones

    If you think C++ is not overly complicated, just what is a protected abstract virtual base pure virtual private destructor and when was the last time you needed one?
    -- Tom Cargin (C++ Journal, Fall 1990) [see http://www.apostate.com/programming/c-tech.html]
    [see Peter van der Linden, _Expert C Programming_, Page 327]

    It has been discovered that C++ provides a remarkable facility for concealing the trivial details of a program - such as where its bugs are.
    -- David Keppel

    When your hammer is C++, everything begins to look like a thumb.
    -- Steve Haflich (smh@franz.com)
  137. Re: Ditto for FreeBSD 4.9 by Anonymous Coward · · Score: 0

    Spectra6# ./2038.pl
    Tue Jan 19 03:14:01 2038
    Tue Jan 19 03:14:02 2038
    Tue Jan 19 03:14:03 2038
    Tue Jan 19 03:14:04 2038
    Tue Jan 19 03:14:05 2038
    Tue Jan 19 03:14:06 2038
    Tue Jan 19 03:14:07 2038
    Fri Dec 13 20:45:52 1901
    Fri Dec 13 20:45:52 1901
    Fri Dec 13 20:45:52 1901
    Spectra6# uname -sr
    FreeBSD 4.9-RELEASE

  138. Pure nonsense! by AvantLegion · · Score: 2, Funny
    What a crock. I'm on an old UNIX machine and nothi.......

  139. uhhh by eyenot · · Score: 1

    uhh, i just did roll back recently and it was without a precedent such as power failure, battery failure, or user error. short of my bios containing behaviours, i am wondering if something like this might explain my recent rollback.

    --
    "Stratigraphically the origin of agriculture and thermonuclear destruction will appear essentially simultaneous" -- Lee
  140. The Matrix Rolled-Over! by Anonymous Coward · · Score: 0

    That's what happens in you live in a Matrix with 32-bit signed integral times.

    Me, I'm looking forward to the period from 1905 to 1910 again.

  141. Re: Tag bits in integers by vrt3 · · Score: 1
    So the tag bits have to be 00 or 01 for even integers and 10 or 11 for odd integers.

    In other words, this is just a very awkward way of doing exactly the same: there are still 31 bits for the integer, and one bit for tagging or whatever.

    --
    This sig under construction. Please check back later.
  142. Are you sure about that? by vrt3 · · Score: 3, Informative
    http://lxr.linux.no/source/include/linux/types.h?v =2.0.39, line 57:
    typedef __kernel_time_t time_t;

    http://lxr.linux.no/source/include/asm-i386/posix_ types.h?v=2.0.39, line 21:
    typedef long __kernel_time_t;

    It's defined as a long for the other architectures as well. AFAIK a long is 32 bits on all platforms Linux 2.0.39 runs on.

    --
    This sig under construction. Please check back later.
    1. Re:Are you sure about that? by Anonymous Coward · · Score: 0

      If it's C, a long has to be at least 32 bits anyway.

    2. Re:Are you sure about that? by transient · · Score: 1

      One of those bits is used for sign, which makes it a 31-bit data type as far as dates are concerned.

      --

      irb(main):001:0>
    3. Re:Are you sure about that? by marnanel · · Score: 1

      RTFA, sir. The variable in the Linux kernel is a 32-bit signed word, like the one in the Linux kernel. Thus, it can hold numbers up to +2 billion, and won't run out until 2038. The variables the article is talking about are 31-bit signed words, and so can hold numbers only up to +1 billion.

      The missing bit in the variables in the article isn't the sign bit.

      --
      GROGGS: alive and well and living in
  143. Re:Seriously, why can't we fix this damn thing now by Gumshoe · · Score: 1
    I know that "long long" is common, but it's not part of the official C++ standard yet.


    All UNIX implementations I've come across are implemented in C, not C++. Happily, the most current ISO specification for C is C99, where "long long" is defined.
  144. Re:Seriously, why can't we fix this damn thing now by fucksl4shd0t · · Score: 1

    In either Perl --snip-- the language actually cooperates in helping the programmer write robust software.

    What are you smoking? The reason Perl is described as line noise is because that's what it looks like. The only character in history that could speak line noise is the Terminatrix! And she's a fucking fiction!

    If Perl cooperates in helping me write robust software then I've got two penises.

    --
    Like what I said? You might like my music
  145. Diameter, or circumference by RockyMountain · · Score: 1


    #define MIN_CHEST 25 /* waif, indeed! */ ...
    size_t chest; /* diameter of chest at most interesting offset */


    Minimum diameter 25! Whoah! Are you sure you don't mean circumference?

    (BTW, I'm assuming inches. Maybe that's where I'm going wrong?)

  146. Already commercial failures on 1 billion seconds by waynemcdougall · · Score: 4, Informative
    Network Associate's (McAfee) Webshield product has already failed on the 1,000,000,000 second test. (In decimal - not a power of 2).

    This SMTP server stores the time to next retry sending a message but only the last 9 digits. So come mid 2001 Webshield would no longer retry sending a mail if the first attempt didn't work. Because it concluded it had been about 30 years since it last tried and it should give up about now.

    There is a hot fix available, but this insidious problem only manifests itself if there is a problem at the receiving end so few people know they should upgrade and blame the recipient for mail that bounces immediately. Network Associates still provide software unpatched - hot fixes are only to be applied if you report he specific problem to be fixed.

    If you use tempfailing (greylisting) as I do, then this immediately stuffs up any Webshield user trying to communciate with you because they will not retry after being given a temporary failure SMTP error code.

    So if this example is anything to go by, then yeah, there'll be recent, modern commercial software that will fail (perhaps in non-obvious ways), with no fix available until after the event.

    --
    Recycle PCs and build a wireless community network www.hillsborough.org.nz
  147. The end of the world by Handyman · · Score: 2, Funny

    I remember talking to a friend who tried to convince me that the earth was going to end somewhere in 2001. Why? Well, it's very simple. The number of the beast is 666, multiply that by three (there was a reason for that too -- not sure what it was, but it was biblical as well). That gives you 1998, and that's the number of years after the birth of Christ that the world is going to end. However, he told me, Jesus Christ wasn't born exactly on the first day of year one, he was actually born somewhere around 3 B.C., so that meant that the end of the world was going to take place in 2001.

    This conversation took place somewhere in the year 2000. He was not very pleased to hear that if he were right, the world would already have ended 5 years ago. :)

    1. Re:The end of the world by AllenChristopher · · Score: 1
      I remember sitting about in shop class on the predicted day. It wasn't January 1st, it was in October or something. All the fifteen-year-old Nostradamic fans were REALLY scared.

      Kids are so funny.

    2. Re:The end of the world by Anonymous Coward · · Score: 0

      That gives you 1998 ... Jesus Christ wasn't born exactly on the first day of year one, he was actually born somewhere around 3 B.C.

      3 B.C. would be the equivalent of -3
      -3 + 1998 = 1995
      Microsoft created Windows 95
      Your friend was right, in a way the world did end sometime in 1995.

    3. Re:The end of the world by kalidasa · · Score: 1

      Nope, 3 BC is the equivalent of -2. You see, the years work like this:

      3 BC -2
      2 BC -1
      1 BC 0
      AD 1 +1
      AD 2 +2
      AD 3 +3
      AD 4 +4

      Notice, no 0 BC or AD 0 (thus no Panic in the Year Zero).

  148. Return values are not checked... by Handyman · · Score: 1

    thank you Unix for combining data and error conditions into one convenient return value!

    I'd love to see the day when one of these functions actually returns an error. AFAIK most C programmers only check error codes on functions of which they expect that they can actually fail when they are used correctly. Getting the current time is not one of these functions. :)

    OK, to be fair, I'll quote the list of errors from the time(2) manpage:

    EFAULT t points outside your accessible address space.

    So the only thing that might cause this is a case of programmer stupidity. I'm not sure whether this error set is specified by POSIX however, so other systems might be able to return additional errors. For instance:

    * EWORLDHASENDED past 21 March 2008 on The Lord's Witnesses's fork of Jesux
    * ESCOLICENSENOTPRESENT on the latest, fully security patched versions of Caldera Linux, etc.

    I'll be laughing my ass off when a system gives me a timestamp in 2116.

    1. Re:Return values are not checked... by Cramer · · Score: 1
      I think EFAULT is a joke... if 't' is outside the accessible address range, that's a segmentation fault.
      • [jfbeam:pts/2{2}]gir:~/[12:05pm]:cat tt.c
        #include <stdio.h>
        #include <time.h>

        int main(void) {
        time((void*)0x7fffffff);
        }

        [jfbeam:pts/2{2}]gir:~/[12:05pm]:gcc -o tt tt.c
        [jfbeam:pts/2{2}]gir:~/[12:05pm]:./tt
        Segme ntation fault
  149. First "Leap Day" of c21 & M3 approacheth by Anonymous Coward · · Score: 0
    Critical and Significant Dates
    J R Stockton
    ..
    2004-01-10 Sat - UNIX time_t $40000000 at 13:37:04 UTC.
    2004-02-29 Sun - First "Leap Day" of c21 & M3.
  150. Re:Seriously, why can't we fix this damn thing now by elFarto+the+2nd · · Score: 1
    struct
    {
    char hour;
    char minute;
    char second;
    long millisecond;

    char day;
    char month;
    long year;
    } new_date_time_t;
    There, problem solved.

    Regards
    elFarto
  151. Re:Seriously, why can't we fix this damn thing now by elFarto+the+2nd · · Score: 1

    And for extra paranoid people, make all values unsigned.

  152. Stupid Lisper by Anonymous Coward · · Score: 0


    You should learn from Unix and Xfree86 -- just recompile everything!

  153. NTP by Detritus · · Score: 1
    Computer clocks can follow UTC very closely with the use of NTP (Network Time Protocol). The problem is that NTP fudges leap seconds. Every time there is a leap second, NTP must tweak the local clock to compensate for the discontinuity. This would not be necessary if NTP was based on TAI. With NTP, even the clocks in commodity PC hardware can be consistently within 20-30 ms of UTC. They could easily meet the same standard with TAI.

    The question is, do we want a uniform and precise time scale, or a time scale that is kept in synchronization with the rotation of the Earth, at the expense of unpredictable discontinuities.

    --
    Mea navis aericumbens anguillis abundat
  154. What a geek's birthday looks like ? by kirinyaga · · Score: 1

    I say, let be REALLY geek, from now on I'll use this : http://www.l9c.org/age.php to get my binary, unix timestamped, age and birthday date ! 967 Mis old, approaching the Gis !

    --
    Kirinyaga
  155. Deja Vu by hao2lian · · Score: 1

    And how do we know this isn't overblown just like Y2K?

    --
    Pelé!
  156. BCD by Detritus · · Score: 1

    Dates were usually stored as character strings or in BCD format on older systems. It was more efficient in CPU time than using integers. Many computers did not have hardware for doing multiplication and division. Even if they had the hardware, multiply and divide were usually much slower than the other ALU operations. It was easier and faster to use BCD or character strings.

    --
    Mea navis aericumbens anguillis abundat
    1. Re:BCD by Trejkaz · · Score: 1

      That's nuts. I find it hard to believe that it takes less time to parse a string, perform a calculation, and format it back into s string, than it takes to simply perform the calculation. Particularly because the calculation is the same calculation in both cases. Parsing just wastes time...

      --
      Karma: It's all a bunch of tree-huggin' hippy crap!
    2. Re:BCD by Detritus · · Score: 1
      What's there to parse if you use a fixed format like YYMMDD or YYYYMMDD?

      If the only thing we did with dates was to use them in calculations, a binary format would optimal. For many programs, date processing is dominated by I/O and sorting. This is classic mainframe data processing. Someone types a date into a form, which is written to a file, processed, displayed and printed. Date calculations are usually limited to comparisons, is date1 (less than, equal to, greater than) date2. These can be easily done in BCD or character form, without converting the date to an integer. The big win is when you do I/O. Conversion between BCD and ASCII/EBCDIC is fast and efficient. So is creating a formatted output record for a display or printer. Using a date as a sort key doesn't require that it be converted to integer form, it can be left in its native form.

      All of this becomes plain if you are writing software for an older and slower computer. Say something with the number crunching ability of a Z-80 or an 8088, where multiply and divide are obvious performance killers.

      --
      Mea navis aericumbens anguillis abundat
    3. Re:BCD by Trejkaz · · Score: 1

      So you're arguing that sorting 64-bit values (8 characters) is faster than sorting 48-bit values (the typical 'acceptable' length of a binary date)?

      --
      Karma: It's all a bunch of tree-huggin' hippy crap!
    4. Re:BCD by Detritus · · Score: 1

      The compare operation for a binary date sort key would be a bit faster than the same for an 8-character field. The problem is that, in the case of the binary date, you have to also consider the extra time spent converting between character and binary format during I/O.

      --
      Mea navis aericumbens anguillis abundat
    5. Re:BCD by Trejkaz · · Score: 1

      I guess. Assuming your IO is to text. *shrug* would be a lot more efficient if the IO were to binary, you'd save 25% of the data space. ;-)

      --
      Karma: It's all a bunch of tree-huggin' hippy crap!
    6. Re:BCD by Detritus · · Score: 1

      Our customers got upset when we tried sending them their bills in binary.

      --
      Mea navis aericumbens anguillis abundat
    7. Re:BCD by Trejkaz · · Score: 1

      Our customers get upset when we don't send their bills in binary (PDF.) ;-)

      --
      Karma: It's all a bunch of tree-huggin' hippy crap!
  157. The Newton blows up in 2010. by MotownAvi · · Score: 1
    Its epoch is midnight 01-Jan-1904 and it uses an unsigned 32-bit integer to count seconds since then. That means it will run out at 06:28:15 09-Feb-2040.

    Wrong.

    The Newton has two clocks: minutes from 1904, and seconds from 1/1/1993. In addition, integers are only 30 bits wide. And signed.

    I wrote a system patch called Fix2010 for the Newton to deal with this problem. Let me quote from the readme:

    The main guts of this patch is obviously the patch to Time. Let me explain to you what I'm doing, and you'll understand better.

    The real-time clock that runs the Newton runs from 1993 through 2010. This is due to the fact that NewtonScript integers are 30 bits, and signed. 2^29 seconds after 1993 is 2010--the end of the Seconds world. The time system, however, is based on minutes from 1904. That won't run out until 2920. Then we'll really be screwed.

    That means that the clock has a 17-year life. After that, the clock will have to be made to repeat some Seconds values. I've defined a term called a hexade. A hexade is a block of 16 years. Hexade 0 is from 1993 (1/1/93, 12AM) to 2009 (1/1/09, 12AM). Hexade 1 is the 16-year block after 2009, and so on. I suppose we could deal with the negative hexades too, but I really don't care, and I don't think anyone else does either.

    The function Time is patched out to read the current hexade (GetUserConfig('hexade)--don't touch that value!), read the RTC, bring the time into the current hexade, and return it. Remember, the RTC thinks we're in hexade 0.

    The function TimeInSeconds is not patched out. I felt this was best for compatibility. This means two things: first, the Seconds timebase is no longer 1993; it is the first year of the current hexade. Secondly, you'd better not rely on Seconds values being consistent.

    Here is a list of functions, and some notes on how they're changed by the installation of Fix2010. (Not all of them are patched; but some rely on patched routines.)

    AddAlarm
    The alarm soup is slightly hacked up. Please use only documented functions to do alarms. Please don't screw around with them yourself. Oh, yeah--AddAlarm works fine.

    AddAlarmInSeconds
    This works, as long as you remember that the Seconds base is the first year of the current hexade, and not necessarily 1993. Or, if you're not sure, just pass in a date frame.

    DateFromSeconds
    Works fine--just remember the new Seconds timebase.

    GetAlarm
    Use it--just follow the advice of the Newton Programming Reference manual (14-11): Do not touch the returned frame. The new slot in the frame is a hexade slot, holding the hexade of the alarm. I know that it's not really necessary, since it can be computed from the time and timeInSeconds slots, but I'm lazy.

    SetTime
    Ah, very important. Pass in any date from 1904 to 2920, with no problem. Or a date frame. See SetTimeInSeconds, below, for more details.

    SetTimeInSeconds
    Just remember that if you pass in a seconds value, you cannot change the date from this hexade. If you want to do so, you'll need to pass a date frame. This function, as well as SetTime, checks the hexade of the new date. If it is different, then it changes to the new hexade, and walks and adjusts the system alarm soup before setting the RTC.

    Time
    Returns the current time. Any time from 1904 to 2920.

    TimeInSeconds
    This is not patched; it returns the value from the RTC. Just keep in mind the Seconds timebase.

    TimeInSecondsToTime
    Just remember the new Seconds timebase. This, like all the other Seconds functions, uses the new base.

    TimeToTimeInSeconds
    Once again, keep the new timebase in mind.

    TotalSeconds
    Works, but just remember the new Seconds timebase. TotalSeconds(0) is not necessarily 1993.

    Version History

    Version 1.0a1 (28 September 1998)
    Initial release for sick, demented alpha-ve

  158. Re:Seriously, why can't we fix this damn thing now by _typo · · Score: 1

    I should have said that in many implementations of C and C++, time() still returns a 32-bit value.

    And this is not a problem at all. Just declare a wider variable and assign the return value of time() to it, an you'll have a wider time to play with. The fact that it returns a 32 bit value will only matter 30+ years from now.

    --

    Pedro Côrte-Real.

  159. Not my date(1): by Chemisor · · Score: 1

    My date(1) insists that I always provide the $$, since arguments for processing the %s can be difficult to process.

  160. Re:Seriously, why can't we fix this damn thing now by Anonymous Coward · · Score: 0
    "...but doing so wouldn't give us the instant gratification we desire now..."


    Not to mention all the "hero" points we get for swooping in at just the last minute to save the day; what, you don't think Superman could have gotten to the railroad crossing more than 20ms before the train and avoided using his own body as an emergency-substitute rail? He's freakin' SUPERMAN, man!! He could'a flown there, spot-welded a new overpass with his heat vision, taken a latte' break and still had time to stop Lois from even stepping into the quicksand, but all he'd get then is a "Gee, Superman, thanks; these slingbacks cost me half a paycheck!" instead've that doe-eyed swoon he always gets!!
  161. Mod parent up by Anonymous Coward · · Score: 0

    Yeah, the poster got the dealie with Lisp entirely wrong. It's a C/Unix problem, which has nothing to do with Lisp itself, but an implementation detail. Most systems have moved or are moving to 64-bit time_t's already, so this problem will go away over time. It can't really be fixed by an implementation, unless the implementation happens to be running before and after the rollover, and notices what's happened.

    1. Re:Mod parent up by dan_b · · Score: 2, Informative

      Most systems are moving or have moved to 64 bit time_t, but that doesn't actually help because the compiled timezone data files which they're still using for timezone and DST lookup are still based on 32 bit quantities. At least, that was the case on my Linux Alpha box (until it died this morning. Need PSU)

      The workaround we have in SBCL sucks more than slightly, to be honest. What we'll probably do at some point is get the source Olsen data ourselves and parse it into a form that doesn't throw useful information away quite as freely.

  162. There is always TAI by grinder · · Score: 1

    There are already reference libraries available that work with 64 bit time values, such as TAI (Temps Atomique International). See libtai for more info. I like the following quote: "Under many cosmological theories, the integers under 2^63 are adequate to cover the entire expected lifetime of the universe; in this case no extensions will be necessary."

    The main problem is crossing the before/after boundary of converting from 32- to 64-bit times. All of a sudden you need two sets of programs to deal with data, depending on whether it was written before or after the switch. Think backups. Think binary database dumps. Panic.

  163. Re:Seriously, why can't we fix this damn thing now by Anonymous Coward · · Score: 0
    And this is not a problem at all. Just declare a wider variable and assign the return value of time() to it, an you'll have a wider time to play with. The fact that it returns a 32 bit value will only matter 30+ years from now.

    Your solution requires a recompile once time() is changed to a wider result. I want a solution that doesn't require a recompile. Why? Ask all those people who didn't think that their 1975 code would still be running in 2000 when the Y2K problem struck.

    Also, I want to know NOW what the exact fate of time_t wil be -- will it be widened or replaced by another data type? I don't think that's an unreasonable request.

    In addition, your solution requires every programmer to take special proactive action. I'd prefer a solution that simply "just works" rather than depending on every programmer doing something special.

  164. Re:Seriously, why can't we fix this damn thing now by Anonymous Coward · · Score: 0

    You raise some interesting points about C++, but all I want to do is just get a simple problem fixed that has gone unfixed for too long.

    Instead of saying "C++" in my original post, I probably should have said "all languages that have a time()-like function that allows the implementation to return only 32 bits".

    I think it's important for it to get fixed in C++ because C++ has such a big influence on other languages.

  165. RedHat results... by ashitaka · · Score: 1

    #perl testime.pl
    Tue Jan 19 03:14:01 2038
    Tue Jan 19 03:14:02 2038
    Tue Jan 19 03:14:03 2038
    Tue Jan 19 03:14:04 2038
    Tue Jan 19 03:14:05 2038
    Tue Jan 19 03:14:06 2038
    Tue Jan 19 03:14:07 2038
    Fri Dec 13 20:45:52 1901
    Fri Dec 13 20:45:52 1901
    Fri Dec 13 20:45:52 1901
    # uname -rs
    Linux 2.4.18-3

    This is 7.3 (Time to move to AS?)

    --
    If you don't want to repeat the past, stop living in it.
  166. Bzzzt,!! wrong! by ashitaka · · Score: 1

    Well, partially wrong.

    A lot of modern Japanese publications are written left-to-right (Computer manuals) but the year-month-day progression is traditional and makes a hell of a lot more sense. Being Canadian we suffer the confusion of governmental dates being in British order and business dates being in U.S. order. I leave our computers in U.S. order at installation as it results in MUCH fewer problems.

    --
    If you don't want to repeat the past, stop living in it.
  167. I'm covered by SuperKendall · · Score: 1

    A few years back I was working on a custom application for one of the "big telcos" - I made sure date entry fields would accept five digit years because you KNOW anything a telco runs is going to be around at least that long.

    --
    "There is more worth loving than we have strength to love." - Brian Jay Stanley
  168. Re:Seriously, why can't we fix this damn thing now by Eric+Smith · · Score: 1
    When was the last time you saw a buffer overrun exploit in a Perl program?

    I didn't say that Perl was a particularly great language, or that I recommend it for writing complex programs. I only said that it doesn't have some of the problems of C and C++. It adds new problems to compensate.

  169. PAINC! there's like 100 YEARS LEFT you win idiots! by Anonymous Coward · · Score: 0

    Take FFFFFFFF and subtract 1072121762

    perl -e 'print "seconds left: ", (time), "\n"'

    seconds left: 1072121762

    and you get 100 years

    Panic! Run around in circles screaming, help, panic!!

    Just don't run windows and your life will be so much better.

  170. Windoze is busted... by the_greywolf · · Score: 1

    $ perl 2038.pl
    Tue Jan 19 03:14:01 2038
    Tue Jan 19 03:14:02 2038
    Tue Jan 19 03:14:03 2038
    Tue Jan 19 03:14:04 2038
    Tue Jan 19 03:14:05 2038
    Tue Jan 19 03:14:06 2038
    Tue Jan 19 03:14:07 2038
    Fri Dec 13 20:45:52 1901
    Fri Dec 13 20:45:52 1901
    Fri Dec 13 20:45:52 1901

    $ uname -mrs
    CYGWIN_NT-5.1 1.5.5(0.94/3/2) i686

    --
    grey wolf
    LET FORTRAN DIE!
  171. Perl binary clock by Keith+McClary · · Score: 1

    I was thinking of software, like:

    perl -e 'while(true){printf "%b\r", `date -u +%s` ;sleep(1);} '

    A fancy odometer-style display would be nice but I can live without it.

  172. Easy: Pentium Wrap-around by fractaltiger · · Score: 1

    but is secretly wondering why you're still using it on a P90 in 2094


    Because Intel may never go out of business and at one point they will ditch their PII, PIII, PIV [...] scheme as soon as processor naming reaches PentiumXXX. Therefore, the shelves will once more say P5, P10, P60, P89...

    ;)

    --
    "Wireless : LAN :: Laptop : Desktop"
    1. Re:Easy: Pentium Wrap-around by Reziac · · Score: 1

      It's probably worse than that. After all, that machine *did* start life as a 486... Hmm. I guess that means the next generation would be a P986. ;)

      --
      ~REZ~ #43301. Who'd fake being me anyway?
  173. Not a billion again! by RomulusNR · · Score: 1

    We already hit 1Bsec two years ago. Slashdot's article on this is disturbingly missing (note article title), but luckily this link lists the milestones.

    But we're talking about 1.073 billion here, a 'gig' of seconds, not a billion... c|net just doesn't know a damn thing, even after all these years.

    (Does it disturb a single other person than me that reporters for technology sites don't know any more about computing than reporters for, like, Fox News?)

    Anyway, have a merry 1072310400.

    --
    Terrorists can attack freedom, but only Congress can destroy it.
  174. Are you crazy??? by OldAndSlow · · Score: 1

    Great, now SCO is going to claim you copied that Perl out of System V, and take down /. on a DCMA claim.

  175. OpenBSD 3.4 Results by tsaler · · Score: 1

    [zaschitnik] # perl 2038.pl Tue Jan 19 03:14:01 2038 Tue Jan 19 03:14:02 2038 Tue Jan 19 03:14:03 2038 Tue Jan 19 03:14:04 2038 Tue Jan 19 03:14:05 2038 Tue Jan 19 03:14:06 2038 Tue Jan 19 03:14:07 2038 Fri Dec 13 20:45:52 1901 Fri Dec 13 20:45:52 1901 Fri Dec 13 20:45:52 1901

  176. Re: Tag bits in integers by some+guy+I+know · · Score: 1

    I was showing the parent how the bit assignments would have to be changed to use the shift method of extracting values.
    You'll notice that in my revised example scheme (no pun intended), there is no distinction between even and odd integers.

    --
    Those who sacrifice security to condemn liberty deserve to repeat history or something. - Benjamin Santayana
  177. Re: Affect vs Effect by some+guy+I+know · · Score: 1
    I know that, in theory, the period (or exclamation point, or whatever the punctuation is with which the sentence ends, goes inside quotes, but that's just not correct to me, logically.
    (In your link, notice that further down the page, a semicolon appears outside the quote in a similar situation:
    Marx did not believe that "a single nation should have a single leader "; nevertheless, he became a leader singled out.
    Does this make sense to you?
    It doesn't to me.
    Note that a similar situation exists for parenthetical sentences/phrases:
    "Animals have a variety of emotions similar to human's" (Erikson 990).
    .
    it makes no sense to me that the period (and comma) should be exceptions to this (very logical) rule.)
    Logically, the sentence should have ended with
    .".
    , one period to end the sentence within the quotes, and one to end the sentence without (i.e., "outside of") the quotes.
    So the logical way to have ended the sentence would have been:
    For example: "Blah blah blah .".
    However, that looks funny to me.
    IMO, quote-period is the better choice between quote-period and period-quote, because quote-period ends the entire sentence, whereas period-quote logically ends only the sentence within the quotes.
    (At least, that's the way that it looks to my computerphilic-parser mind.)
    From now on, though, I will use two periods.
    Satisfied?
    --
    Those who sacrifice security to condemn liberty deserve to repeat history or something. - Benjamin Santayana
  178. Re: Tag bits in integers by vrt3 · · Score: 1

    When I said 'this is just a very awkward way...', I was referring to the scheme in your post's parent. Wich, as you demonstrated, doesn't have any added value. So I think you and I are saying the same thing here.

    --
    This sig under construction. Please check back later.
  179. laern to spell! by BorgCopyeditor · · Score: 1
    [dodges tomatos]

    "Tomatoes."

    ... just sayin'.

    --
    Shop as usual. And avoid panic buying.
  180. solaris 9 sparc by kfuq · · Score: 1

    look like solaris 9 doesn't roll either

    $ perl 2038.pl
    Tue Jan 19 03:14:01 2038
    Tue Jan 19 03:14:02 2038
    Tue Jan 19 03:14:03 2038
    Tue Jan 19 03:14:04 2038
    Tue Jan 19 03:14:05 2038
    Tue Jan 19 03:14:06 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    Tue Jan 19 03:14:07 2038
    $ uname -a
    SunOS station 5.9 Generic_112233-08 sun4m sparc SUNW,SPARCstation-20
    $ perl -v
    This is perl, v5.8.0 built for sun4-solaris


    --
    iF yOu WAnT to C YOUr iP agaIn gAThEr tWO MilLIon dOLLArS IN Non - cONsEcuTivE TweNtY's AnD AWaiT FuRThER iNstrUctIoN
  181. You never need to do that... (really) by IBitOBear · · Score: 1

    Seriously people. You actually *DONT* need to represent times (rememberdates are large times) before the epoch. At least not in the scope of the time_t data type.

    The scope of the project and standard in quesiton is represent "now" (the current time) and to place, track, and manipulate time signatures for operating-sytem level events. You know, things like "date file created" and "date file last modified" and so forth.

    The time_t type exists to let directory updates and newer-than/older-than comparasons happen in "very small, linear time" so that it is cost effective to, say, search a directory in chronological order or see if an object file needs to be recompiled.

    Go see how porly these functions work using windows networking accross a slow link and you will get an inkling about why this speed vs limit tradeoff is important.

    There is no rational need to represent a "now" of such historical scope WITH RESPECT TO AN OPERATING SYSTEM DATA.

    Yes, some idiot programmers out there are using this time_t datum in "very bad" contexts. Databases of historical fact that are expected to contain items predating the epoc (birth registries, deed and title search databases, publishing databases, and so on) ARE *completely* unsuited for, and outside the intent of, the time_t "quanta past epoch" representation for dates and times.

    Saying time_t is bad for historical dates is "exactly" as valid as mentionting that ASCII is not a good character set for representing hyroglyphs. The word "duh" comes to mind.

    In "real data" (as opposed to OS event/contemporary transient data) there are actually two types of "time" the ordinal (spesific date and time) and the inerval (a measure of duration). An actual data storage system (database) needs to have an internal abstraction for storing and "doing math (uniformly) over" and "indexing across" those two abstractions.

    So for real data you need explicit structures.

    --
    Innocent people shouldn't be forced to pay for inferior software development.
    --"Code Complete" Microsoft Press
  182. I saw this on a DirecTv box. by Raven42rac · · Score: 1

    I saw this on a DirecTv box. I was at a friend's house on christmas and on the DirecTv info bar it listed the date as 1/08/70. Dunno if it was due to a lazy operater, or this bug. For further info this is a DirecTv receiver built into an HDTV receiver, unsure of the brand, but it is a widescreen. It is about 4 years old, tops.

    --
    I hate sigs.