Slashdot Mirror


Raise a Glass — Time(2) Turns 40 Tonight

ddt writes "Raise your glasses of champagne in a toast at midnight. The time(2) system call turns 40 tonight, and is now officially 'over the hill.' It's been dutifully keeping track of time for clueful operating systems since January 1, 1970." And speaking of time, if you don't have a *nix system handy, or just want a second opinion, an anonymous reader points out this handy way to check just how far it is after local midnight in Unix time. Updated 10:03 GMT by timothy: The Unix-time-in-a-browser link has been replaced by a Rick Astley video; you have been warned.

11 of 114 comments (clear)

  1. First Post! by therufus · · Score: 5, Informative

    There is a rickroll in article. Beware to click!

    --
    You moved your mouse. Please restart Windows for changes to take effect.
  2. It's not April 1 yet by SpazmodeusG · · Score: 2, Informative

    That second link is a Rick Roll.
    Did you even check it?

  3. Re:Unix epoch? by Anonymous Coward · · Score: 1, Informative

    because unix was invented in 1970?

  4. Only a rickroll after midnight by Xocet_00 · · Score: 4, Informative

    It's 12:21am, Jan 1, 2010 here and I got rickrolleded. I set my clock back a day, and got a white screen with a countdown.

  5. Re:Give it 28 years by Anonymous Coward · · Score: 2, Informative

    time_t is signed.

  6. This is not true by ucblockhead · · Score: 5, Informative

    Epoch starts at January 1st, 1970, but the system call itself was not around in 1970.

    --
    The cake is a pie
  7. Re:That's funny,... by KTheorem · · Score: 2, Informative

    That's output from the 'ddate'—Discordian date—program.

  8. Re:Over the hill? by wagnerrp · · Score: 2, Informative

    Anyone else notice the top of the hill is 1337?

  9. Re:Give it 28 years by mysidia · · Score: 5, Informative

    Nope, the maximum value for 32-bit time_t is 2147483647. Increment that by 1, and the time_t value becomes -2147483648.

    Although time_t is a 32-bit value, the 1st bit is the sign bit.

    Jan 18 21:14:07, 2038

    For 64-bit time_t it should be 9223372036854775807. But I don't believe the standard time functions can handle this value...

    While it may be a perfectly valid 64-bit time_t value, if gmtime/localtime/strftime/ctime don't work with the maximum value, it's not a usable value, really

  10. Re:Give it 28 years by wizardforce · · Score: 3, Informative

    The 32-bit time_t is signed (I'm assuming so you can expression times less than the epoch, but that's just a guess)

    Indeed.
    Some binary blobs do require the use of a signed integer for calculating differences in time which is much of the apparent hesitancy to convert to a 32 bit unsigned integer time system. More here.

    --
    Sigs are too short to say anything truly profound so read the above post instead.
  11. Re:Give it 28 years by Anonymous Coward · · Score: 1, Informative

    Although time_t is a 32-bit value, the 1st bit is the sign bit.

    The 1st bit is not a sign bit! Signed integer coding uses two's complement arithmetic.