Slashdot Mirror


February 13th, UNIX Time Will Reach 1234567890

mikesd81 writes "Over at Linux Magazine Online, Jon maddog Hall writes that on Friday the 13th, 2009 at 11:31:30pm UTC UNIX time will reach 1,234,567,890. This will be Friday, February 13th at 1831 and 30 seconds EST. Matias Palomec has a perl script you an use to see what time that will be for you: perl -e 'print scalar localtime(1234567890),"\n";' Now, while this is not the UNIX epoch, Alan Cox does assure us that Linux is now working on 64-bit time, and the UNIX epoch 'roll-over' would happen about the time that the sun burnt out."

62 of 376 comments (clear)

  1. Leap Seconds? by John+Hasler · · Score: 5, Funny

    Is that with or without leap seconds?

    --
    Warning: this article may contain humor, sarcasm, parody, and perhaps even irony. Read at your own risk.
    1. Re:Leap Seconds? by dotancohen · · Score: 5, Funny

      On Friday the 13th, every second is a leap second. BOO!

      --
      It is dangerous to be right when the government is wrong.
    2. Re:Leap Seconds? by Yvan256 · · Score: 4, Funny

      What do you mean? An African or European leap second?

    3. Re:Leap Seconds? by yezu · · Score: 2, Funny

      In Soviet Russia the seconds leap You!

    4. Re:Leap Seconds? by Z00L00K · · Score: 2, Insightful

      But here it won't happen until Saturday.

      "Sat Feb 14 00:31:30 2009 CET"

      --
      If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
  2. scalar() unnecessary by A+nonymous+Coward · · Score: 4, Informative

    perl -e 'print localtime(1234567890) ."\n";'

    Let the "." concatenate operator do it for you.

    1. Re:scalar() unnecessary by rfuilrez · · Score: 5, Interesting

      TIZZLE:~ ben$ perl -e 'print localtime(1234554321) ."\n";'
      Fri Feb 13 13:45:21 2009

      Apparently a palindrome is one the same day!

    2. Re:scalar() unnecessary by jlarocco · · Score: 4, Informative

      Perl is unnecessary:

      date -d@1234567890

    3. Re:scalar() unnecessary by Anonymous Coward · · Score: 5, Funny

      Thus proving TMTOWTDI. ;)

      Teenage mutant turtle on wild turtle date...? What the hell does I stand for?!

  3. It's also a notable day because... by A+beautiful+mind · · Score: 5, Funny

    ...it's my birthday. I've been telling people for years that my birthday is at 1234567890.

    --
    It takes a man to suffer ignorance and smile
    Be yourself no matter what they say
    1. Re:It's also a notable day because... by jellomizer · · Score: 5, Funny

      Then they look at you like you are an idiot and never talk to you again. enjoy you birthday alone.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    2. Re:It's also a notable day because... by kohaku · · Score: 5, Funny

      WRONG. I'll bet his birthday party is going to be EPOCH.

    3. Re:It's also a notable day because... by rwwyatt · · Score: 2, Funny

      And this is different from the normal slashdotter's day how? Most slashdotter's would be happy to enjoy only their birthday alone.

    4. Re:It's also a notable day because... by beav007 · · Score: 4, Funny

      Don't forget to party like it's 915148769

    5. Re:It's also a notable day because... by ahankinson · · Score: 4, Funny

      Party like it's 7pm on Dec. 31, 1998? Geez... at least wait until 915166800

  4. Actually, the date... by dotancohen · · Score: 3, Funny

    ...that I really feel I missed:

    $ perl -e 'print scalar localtime(8675309),"\n";'
    Sat Apr 11 11:48:29 1970

    --
    It is dangerous to be right when the government is wrong.
  5. What kind of stupid time is that? by John.P.Jones · · Score: 4, Funny

    So the time is 123456789? That's the stupidest time I've ever heard in my life... It sounds like something an idiot would have on his luggage.

    1. Re:What kind of stupid time is that? by Anonymous Coward · · Score: 2, Funny

      Hey! That's my luggage combination!

    2. Re:What kind of stupid time is that? by Waffle+Iron · · Score: 2, Insightful

      So the time is 123456789? That's the stupidest time I've ever heard in my life... It sounds like something an idiot would have on his luggage.

      Indeed, it would be hard to find a more stupid era than Nov 1973. It was the height of the Watergate scandal, a time of inflation, energy crisis, bad haircuts, ugly suits, and the quality of pop music spiraling downward. Truly a nadir in modern history.

    3. Re:What kind of stupid time is that? by DiegoBravo · · Score: 2, Funny

      > and the quality of pop music spiraling downward. Truly a nadir in modern history.

      I'd call that an inflection point. The nadir is TODAY.

  6. Re:so what? by Bozzio · · Score: 4, Funny

    Wow, you must have a hard time finding joy in anything.

    --
    I just pooped your party.
  7. Perl script is unnecessary by Chris+Pimlott · · Score: 5, Informative

    The standard unix date command will suffice:

    date -d @1234567890

    1. Re:Perl script is unnecessary by Anonymous Coward · · Score: 5, Funny
      Leave it to a Slashdot story to make my terminal window look like this:

      dave@tomservo:~$ perl -e 'print scalar localtime(1234567890),"\n";'
      Fri Feb 13 18:31:30 2009
      dave@tomservo:~$ perl -e 'print ~~ localtime(1234567890),"\n"'
      Fri Feb 13 18:31:30 2009
      dave@tomservo:~$ perl -e 'print localtime(1234567890) ."\n";'
      Fri Feb 13 18:31:30 2009
      dave@tomservo:~$ `watch date +"%s"`

      dave@tomservo:~$ perl -le 'print ~~localtime 1234567890'
      Fri Feb 13 18:31:30 2009
      dave@tomservo:~$ date -d @1234567890
      Fri Feb 13 18:31:30 EST 2009
      dave@tomservo:~$

      I've wasted my life.

  8. Re:so what? by product+byproduct · · Score: 2, Interesting

    11.23 seconds later UNIX time will reach 10^11/3^4. You can celebrate that instead.

  9. Re:Must be a slow news day.. by sakdoctor · · Score: 2, Informative

    I'm going to quit work before 2147483647 because I don't want to update all my code.

  10. With by Vellmont · · Score: 3, Informative

    Good question:
    http://en.wikipedia.org/wiki/Unix_time

    the times it represents are UTC but it has no way of representing UTC leap seconds (e.g. 1998-12-31 23:59:60).

    I don't think there's any defined way for a POSIX machine to deal with leap seconds. The usual solution is to slew the clock a bit after they occur.

    --
    AccountKiller
    1. Re:With by ultranova · · Score: 4, Informative

      maybe we could just move to a calendar and time system that gives finer resolution and is based on 10's like the metric system.

      Unix clock is using the metric system. "Second", after all, is the metric unit for time, and Unix clock simply counts the seconds after a certain point in time. It's only the human representation of that value which deals with minutes and such.

      --

      Forget magic. Any technology distinguishable from divine power is insufficiently advanced.

    2. Re:With by FST777 · · Score: 2, Insightful

      The resolution is not the problem. Due to the fact that we are measuring nature, small changes do happen. This is the reason that leap seconds aren't scheduled decades in advance.

      See here.

      I'd like the metric system to take over our measurement of time, but, disregarding other problems, it won't solve the leap second issue all by itself.

      --
      Free beer is never free as in speech. Free speech is always free as in beer.
    3. Re:With by Daimanta · · Score: 4, Informative

      The french tried it. It failed.

      The days(fixed) in a year(fixed) are not divisible by 10 so there were days without a month. Furthermore it increases the number of days in each week and it changed the definition of the hour(10 each day) the minute(100 each hour) and the second(100 each minute).

      All in all, it was a mess. Not designed with nature as a guideline(like pretty much all other calendars) but with the number 10, a number based on the fingers on our hands.

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

      --
      Knowledge is power. Knowledge shared is power lost.
    4. Re:With by schon · · Score: 4, Informative

      in what way is the "second" metric?

      How about this way?

    5. Re:With by Anonymous Coward · · Score: 5, Funny

      The french tried it. It failed.

      If any post should be marked redundant...

    6. Re:With by jeremyp · · Score: 2, Informative

      The second is the official SI unit of time.

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

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
  11. Re:Why perl? by eddy · · Score: 2, Interesting

    Or if you want the countdown, something like while true; do let a=1234567890-`date +"%s"`; echo $a; sleep 1; done"

    --
    Belief is the currency of delusion.
  12. why command-line? by FooAtWFU · · Score: 5, Interesting
    --
    The World Wide Web is dying. Soon, we shall have only the Internet.
    1. Re:why command-line? by Locklin · · Score: 2, Funny

      You are talking about the countdown to a "cool" number in UNIX time, and you don't want to use the command line???

      --
      "Knowledge is the only instrument of production that is not subject to diminishing returns" -Journal of Political Econom
  13. Re:so what? by arogier · · Score: 2, Funny

    Just wait till Unix time reaches 3141592654 (sorry I rounded up the last digit on the holy number, if its that bad you can celebrate a second earlier) If you think people get crazy about pi day wait till you mix pi and unix.

  14. Re:Must be a slow news day.. by FooAtWFU · · Score: 5, Funny

    The OS itself may live past the 2038 32-bit time_t rollover, but the same cannot be said about all mission-critical apps that may be running on top of the Linux OS.

    Or any OS, for that matter.

    And now a bit of topical humor so this post isn't purely an exercise in pointing out the obvious: "Every day is a long day, because 86400 seconds won't fit in a short."

    --
    The World Wide Web is dying. Soon, we shall have only the Internet.
  15. For about half the world .... by taniwha · · Score: 3, Interesting

    this of course will be happening on Sat Feb 14th .... at about lunch time here in NZ .... earlier that day (at breakfast) it will be 1234554321

  16. Y2^40K by DRJlaw · · Score: 5, Funny

    Alan Cox does assure us that Linux is now working on 64-bit time, and the UNIX epoch 'roll-over' would happen about the time that the sun burnt out."

    This is just the sort of short-sighted thinking that lead to our recent Y2K hysteria, except this time our poor beleaguered descendents will be in the middle of an exodus from the solar system when all their legacy systems throw simultaneous exceptions. This will of course cause their engine and guidance systems to fail, so that the last dying gasps of humanity will consist of:

    [Captain]Captain's log, stardate 1704.4. Ship out of control, spiraling down towards Sol; we have 19 minutes of life left, without engine power or helm control.
    [Engineer interrupting] I'll be damned. The clocks on every piece of technology in existence have failed because that damned Brit used a 64 bit counter...
    [Captain]COOOOOOOOOOOOOX!!!"

    1. Re:Y2^40K by Simetrical · · Score: 2, Funny

      Alan Cox does assure us that Linux is now working on 64-bit time, and the UNIX epoch 'roll-over' would happen about the time that the sun burnt out."

      This is just the sort of short-sighted thinking that lead to our recent Y2K hysteria, except this time our poor beleaguered descendents will be in the middle of an exodus from the solar system when all their legacy systems throw simultaneous exceptions. This will of course cause their engine and guidance systems to fail, so that the last dying gasps of humanity will consist of:

      [Captain]Captain's log, stardate 1704.4. Ship out of control, spiraling down towards Sol; we have 19 minutes of life left, without engine power or helm control. [Engineer interrupting] I'll be damned. The clocks on every piece of technology in existence have failed because that damned Brit used a 64 bit counter... [Captain]COOOOOOOOOOOOOX!!!"

      If only they had followed RFC2550, that would never have happened!

      --
      MediaWiki developer, Total War Center sysadmin
  17. UNIX epoch 'roll-over' by Anonymous Coward · · Score: 2, Funny

    >UNIX epoch 'roll-over' would happen about the time that the sun burnt out."

    Yes, that will be a nice little surprise for whatever cyborg/singularity we've evolved into as they try to flee to a habitable star system in their linux controlled vessels.

    Linux will doom us all.
    BG

    1. Re:UNIX epoch 'roll-over' by Voyager529 · · Score: 2, Funny

      This will all be settled by the Great Windo-Linux War of 2089. Or so my future self told me, during his last visit.

      ...So 2089 will be the year of the Linux desktop?

  18. Re:so what? by techno-vampire · · Score: 5, Funny
    If you think people get crazy about pi day wait till you mix pi and unix.

    However, considering that OSX is based on BSD, you can also get Apple pi.

    --
    Good, inexpensive web hosting
  19. dammit! by tbj61898 · · Score: 4, Funny

    it's my password... now everyone know it, thanks SLASHDOT! :-)

    --
    nop, nop, nop #VBLANK
  20. Why all the hatin'? by altek · · Score: 4, Insightful

    Yes, it's a slow news day and that's why this is on the front page! It's Sunday afternoon (for most of us), ferchrissakes.

    So just enjoy it, it's geeky and novel. I don't think anybody meant for it to be considered a big deal, and if you don't find any fleeting moment of joy from it, just move along.

    --
    THE MAGIC WORDS ARE SQUEAMISH OSSIFRAGE
  21. Leap seconds by CustomDesigned · · Score: 5, Insightful

    Raw unix time is simply a count of seconds since a defined point in time - and has nothing to do with leap seconds. Leap seconds only come into play when converting to human readable display format (along with timezones and DST). Leap seconds have been handled for some time by the zoneinfo library used by most unix and linux distros. Even Java handles leap seconds with my port of zoneinfo to a Java TimeZone implementation.

    The tzdata package included in most Linux distros includes leapsecond data in the "right" directory. You can find out the time including leapseconds by setting your TZ environment variable to "right/...". For instance:


    $ TZ="right/US/Eastern" date; TZ="US/Eastern" date
    Sun Feb 8 17:52:42 EST 2009
    Sun Feb 8 17:53:06 EST 2009

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

      Unfortunately you're wrong. "Unfortunately" because that would have made sense. Unix time counts the (milli-)seconds since the Unix epoch excluding leap seconds. As far as Unix time is concerned, these seconds don't exist. What's worse, the behavior near a leap second is not defined. Some slew the clock, some stop it for a second, some even repeat the second. As it stands, Unix (POSIX) does not have a way to reliably count the seconds between two points in time. If you're not thinking "WTF?" now, read that again.

    2. Re:Leap seconds by TeXMaster · · Score: 2, Informative

      Fortunately, the one who's wrong is you. Unix time counts the (milli)seconds elapsed since the Unix epoch, full stop. When leap seconds are introduced, they elapse just as well as normal seconds, although every minute, hour, day, week, month, year etc containing will be one second longer (e.g. the minute will be 61 seconds long instead of 60 seconds long). So you only care about leap seconds and Unix time only when you have to convert from Unix time to human-readable form, or conversely, because instead of simple divisions and multiplication by the usual 60 seconds you'll have to interspread some division/multiplication by 61.

      --
      "I'm never quite so stupid as when I'm being smart" (Linus van Pelt)
    3. Re:Leap seconds by hamster_nz · · Score: 3, Informative

      Sorry, UNIX time is exactly 86400 seconds per day.

      If you read this history of POSIX time it becomes apparent that POSIX time is a mashup of UTC and GMT that is different to either.

      The standard does not require your system clock to be accurate. When a leap second occurs, unless your POSIX system makes the effort to adjust its clock (say via the adjtimex(2) call), your POSIX system's clock will ignore the leap second.

      To make matters worse, people are now syncing their systems to a UTC or TIA time source, or perhaps even GPS time which are all defined on different foundations.

      You can not assume that POSIX time actually means anything better than the time on your watch does, unless you are fully aware the whole chain.

    4. Re:Leap seconds by Qzukk · · Score: 2, Informative

      Oh, that's right, it doesn't.

      Exactly. That's why all programs should store and communicate future date/times in local time format (with the local timezone) and use GMT only for the current time or past events, because nobody knows when the government is going to come along and redefine time. Your 3PM appointment at the dentist is at 3PM regardless of how many leap seconds get inserted or if its decided that this year, daylight saving time will only shift by 30 minutes, or whatever other crisis may come.

      --
      If I have been able to see further than others, it is because I bought a pair of binoculars.
    5. Re:Leap seconds by JackHoffman · · Score: 3, Informative

      Total moderation failure...

      Here's how the standard defines the meaning of "seconds since the epoch" in relation to UTC dates: http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap04.html#tag_04_14
      As you can see, the meaning is actually "seconds since the epoch, excluding leap seconds." Always read the definitions.

      According to that definition, the time_t value of "Friday the 13th, 2009 at 11:31:30pm UTC" is:
      30 + 31*60 + 23*3600 + 43*86400 + (109-70)*31536000 + ((109-69)/4)*86400 - ((109-1)/100)*86400 + ((109+299)/400)*86400
      = 30 + 1860 + 39600 + 3715200 + 1229904000 + 864000 - 86400 + 86400
      = 1234567890

      So, to answer the question which started this: Not including leap seconds.

      Besides, it should be "Friday the 13th, 2009 at 23:31:30 UTC." The am/pm notation is not without ambiguities.

    6. Re:Leap seconds by sshock · · Score: 4, Informative

      Sorry, UNIX time is exactly 86400 seconds per day.

      Exactly. Mod parent up. Mod gparent down.

      date -u -d @1230767999
      Wed Dec 31 23:59:59 UTC 2008

      date -u -d @1230768000
      Thu Jan 1 00:00:00 UTC 2009

      What happened to the leap second? It was completely ignored, yep.

    7. Re:Leap seconds by omnichad · · Score: 3, Insightful

      Pedantically.... You should always store in UTC. GMT is just a more important local time, but still subject to local laws and whims.

    8. Re:Leap seconds by Alain+Williams · · Score: 2, Informative
      Try again with the 'right' timezone -- note the seconds of '60':

      TZ="right/GB" date -d @1230768022
      Wed Dec 31 23:59:59 GMT 2008

      TZ="right/GB" date -d @1230768023
      Wed Dec 31 23:59:60 GMT 2008

      TZ="right/GB" date -d @1230768024
      Thu Jan 1 00:00:00 GMT 2009

  22. S^64 and Solar burnout by sprior · · Score: 4, Funny

    Alan Cox does assure us that Linux is now working on 64-bit time, and the UNIX epoch 'roll-over' would happen about the time that the sun burnt out."

    So great, we're going to be dealing with the 64bit time roll over in the dark? What kinda planning is that! Do we have candles?

  23. Re:so what? by MobileTatsu-NJG · · Score: 3, Funny

    1234567890 is some arbitrary decimal string, if you wished to note a notable number, why not one which is 2^N, for something so entirely based within computers, it seems much more sensible to think in binary than some decimal number which happens to look a little pretty

    Why do we have gaydar but not virgindar?

    --

    "I like to lick butts!" by MobileTatsu-NJG (#32700246) (Score:5, Informative)

  24. 64-bit time EXCEPT... by jimicus · · Score: 4, Interesting

    ... for any application that assumes sizeof(time_t) is 32 bits.

    Not that I'd expect that to be the case with any half-decent intelligently written application. But we all know how common applications which are neither half-decent nor intelligently written are...

  25. Linux interpretation of Posix by CustomDesigned · · Score: 4, Informative

    I am gratified to see that time() in gnu/linux returns seconds since the epoch. They mention the contradictory requirements of Posix, but opine that it was a technical error, and seconds since the epoch is what they really meant (or should have meant).

    NOTES POSIX.1 defines seconds since the Epoch as a value to be interpreted as
                  the number of seconds between a specified time and the Epoch, according
                  to a formula for conversion from UTC equivalent to conversion on the
                  naive basis that leap seconds are ignored and all years divisible by 4
                  are leap years. This value is not the same as the actual number of
                  seconds between the time and the Epoch, because of leap seconds and
                  because clocks are not required to be synchronised to a standard refer-
                  ence. The intention is that the interpretation of seconds since the
                  Epoch values be consistent; see POSIX.1 Annex B 2.2.2 for further
                  rationale.

  26. Re:so what? by FlyingBishop · · Score: 2, Informative

    I think you're having some trouble with overflow. Try 64 bit:
    [bishop@cluster ~]$ perl -e 'print scalar localtime(3151592653),"\n"'
    Wed Nov 13 12:24:13 2069

    32 bit:
    bishop@home $ perl -e 'print scalar localtime(3141592653),"\n"'
    Wed Jun 14 13:09:17 1933

  27. let's see... by Anonymous Coward · · Score: 2, Funny
  28. Re:Posix != unix by Anonymous Coward · · Score: 2, Informative

    Well I guess you're running a very weird version of linux then. I've done a LOT of time related on UNIX over the years (including dealing with the leap second question) and I can assure you that the following UNIXes all follow the Posix definition: Linux, Solaris, FreeBSD, OS/X, AIX, HP/UX, OpenBSD. I'm not aware of a single UNIX that operates differently.

    On systems that have timezone support based on the reference zoneinfo implementation you can use a $TZ prefixed with "right/" (i.e. "right/US/Eastern", etc...) to use an alternative timescale where time_t includes leap seconds. I've never seen a linux distro that enabled this by default. Some zoneinfo-using OSes (like OS/X) don't even bother to ship these files.

    Also ntpd only supports the POSIX definition. So if you're using a UNIX with ntpd support, guess what... you have POSIX time_t.

    But if you STILL don't believe me, here's a one-liner you can try running at your shell prompt (assuming you have GNU date, like on a linux box):

        $ date -d@1230767999; date -d@1230768000
        Wed Dec 31 15:59:59 PST 2008
        Wed Dec 31 16:00:00 PST 2008

    Note that those two times were NOT consecutive (there was a leap second @23:59:60 GMT) but, as you can see, they had consecutive time_t's. Also note how the beginning of every hour has a time_t that is divisible by 100 (since posix assumes that all hours are 3600 seconds)

  29. RFC2550 considered harmful by jvonk · · Score: 2, Informative

    Hm. I read the RFC, and it seems patently insufficient when discussing necessary granularity. Clearly, time should be represented in Planck units, as this is the (currently theorized) maximum necessary resolution to describe a timepoint.

    Current estimates on the age of the universe indicate that approximately 10^61 planck times have elapsed. This puts us at a present need beyond 128-bit time.

    Assuming the ultimate fate of the universe is heat death with proton decay, then 256-bit time should cover the span of the life of the universe to beyond the presence of matter (~10^100 years).

    For the truly pedantic, Planck-resolution time structs could be coupled with meta-size header concept from the I-TAG described in RFC2795, which would yield arbitrary representation in the case of future needs, such as if the universe does not die on schedule.

    It is left as an open question to decide where the zero-point of the calendar should be fixed, given the imprecise knowledge of the birth of the universe.