DISCOVER Magazine. Science, Technology and The Future
Current Issue
Subscribe Today »
  • Renew
  • Give a Gift
  • Archives
  • Customer Service
  • Facebook
  • Twitter
  • Newsletter
  • Health & Medicine
  • Mind & Brain
  • Technology
  • Space
  • Human Origins
  • Living World
  • Environment
  • Physics & Math
  • Video
  • Photos
  • Podcast
  • RSS
Bad Astronomy
« Scientific valentines
And Iran, so far away »

Epoch win!

Note: My apologies; this got briefly posted on the 12th by accident. I took it down and reposted it on the 13th, the correct day. Sorry!

Do you know Unix? If you do, then today at 18:31:30 (Eastern US) is an interesting time. If you have a Mac or Unix machine, type this into your terminal prompt:

perl -e ‘print scalar localtime(1234567890),”\n”;’

:-)

I know, dorky. But then, whenever I see a digital clock reading "10:54", I always say "Crab Nebula time!".

If you thought you could outdork me, give up now.

Share

February 13th, 2009 12:00 PM by Phil Plait in Cool stuff, Humor | 67 comments | RSS feed | Trackback >

67 Responses to “Epoch win!”

  1. 1.   Barry Says:
    February 12th, 2009 at 8:35 pm

    It feels like only 35 years since we celebrated 123456789…

  2. 2.   Nicole Says:
    February 12th, 2009 at 8:41 pm

    Wow. There is nothing more to say. Unix time I can handle. But Crab Nebula time just blew my mind.

    All hail our dorky overlord!

  3. 3.   Eric Wallace Says:
    February 12th, 2009 at 8:58 pm

    But then, whenever I see a digital clock reading “10:54″, I always say “Crab Nebula time!”. < \blockquote>
    Wow, that took me a while. I was trying to figure out why Crab time wasn’t something like 5:34:22. Maybe I’ll designate that Crab Pulsar time.

  4. 4.   Ryan Says:
    February 12th, 2009 at 9:01 pm

    I feel really dumb now. I run a website and have lots of logs with Unix timestamps in them and noticed the 1234 part recently. But I failed to realize this was happening.

  5. 5.   mocular Says:
    February 12th, 2009 at 9:03 pm

    Uh, I must have entered a time warp….I get

    Fri Feb 13 16:31:30 2009

    when it’s only Thursday here along the Colorado Front Range. I suppose BA runs in Universal Time?

  6. 6.   Ryan Says:
    February 12th, 2009 at 9:05 pm

    Um, so I did run this on my Linux machine and it says this happens tomorrow.

    More like Epoch FAIL

  7. 7.   James McCann Says:
    February 12th, 2009 at 9:06 pm

    I guess that’s cool, but next time you post a shell command please use proper ASCII quotes.

    Harrumph!

    Oh and happy Darwin Day.

  8. 8.   Shane Says:
    February 12th, 2009 at 9:08 pm

    Hmm, I thought unix sang falsetto and a mac made you fat. Why do they need a script to get the time?
    ;-)

  9. 9.   Eric Wallace Says:
    February 12th, 2009 at 9:19 pm

    But then, whenever I see a digital clock reading “10:54″, I always say “Crab Nebula time!”. < \blockquote>

    Wow, that took me a while. I kept wondering why it wasn’t something like 5:34:22. Maybe I’ll just designate that as Crab Pulsar time.

    And I also get Friday with the Unix time thing. And interestingly, a simple copy/paste of your command gave me a syntax error, but typing it manually was fine. It looks like the quotes got copied with some formatting that caused the shell to not recognize them (maybe some other unicode character, or something along those lines?)

    And sorry if the first part of this is a double comment.

  10. 10.   Mike Says:
    February 13th, 2009 at 12:07 pm

    I finally got 10:54. But I think my favorite has to be my university mail code… You can reach me at 1987A!

  11. 11.   Harold Says:
    February 13th, 2009 at 12:14 pm

    Yes. I was all confused about this last night, and then it disappeared before I could say anything.

    Premature epostulation puts a little tarnish on your dorkly crown!

  12. 12.   becky'sthoughts Says:
    February 13th, 2009 at 12:19 pm

    Thank you for that. We used to call 10:04, comb jelly time. My nerditude knows no bounds.

  13. 13.   mike Says:
    February 13th, 2009 at 12:25 pm

    Cute, but I really prefer palindromes.

    perl -e ‘print scalar localtime(1234554321);’

    That’s in 25 minutes. Nice excuse for lunch (PST).

    And using the year as a time? Pshaw. Now, if you were a REAL geek, you would have an alarm clock in LST. How else will you know when your favorite star is on the meridian?

    Might make for fun work schedules. Almost as fun as those poor JPL saps who have to work on Mars sols.

  14. 14.   Brian Says:
    February 13th, 2009 at 12:28 pm

    Shorter command to do the same thing: perl -le 'print~~localtime 1234567890'

    (James McCann: don’t blame Phil; it’s actually a feature of WordPress to automatically replace ASCII single-quotes with the Unicode variants. Very annoying when dealing with code.)

    Did anyone else here attend a gigasecond party back in 2001 when the Epoch hit 1000000000? That was convenient because it fell on a Saturday. I have friends who wanted to throw a 1234567890 party, but everyone’s at work today.

  15. 15.   Wayne Says:
    February 13th, 2009 at 12:33 pm

    Ah yes, I remember in high school watching the clock turn 01:23:45 on the 6th of July, ’89. My nerd cred goes way back. Also, a couple of minutes before I saw this post I was telling a student how I celebrated my billionth second birthday as a post-doc. He just came back and said he would be a billion seconds old in 2020. I’m getting old.

  16. 16.   Bill Says:
    February 13th, 2009 at 1:01 pm

    I’ve always been a fan of “binary days” myself Jan 1,10,11; Oct 1,10,11, Nov 1,10,11. After 11/11/11, I’ll have no more in my lifetime to look forward to. :(

  17. 17.   Steve Says:
    February 13th, 2009 at 1:01 pm

    I’d missed my billionth birthsecond (10^9), so I celebrated my birth-gibisecond. I was 2^30 seconds old. I figured noting the clock rolling over in binary was a decent second best for a computer science guy.

    If you’re on certain unixes “date -r 1073741824″ is shorter.

  18. 18.   uknesvuinng Says:
    February 13th, 2009 at 1:06 pm

    OT, but Wired Magazine has a collection of pretty pictures: http://www.wired.com/science/space/multimedia/2009/02/gallery_dwarf_stars

  19. 19.   Hoonser Says:
    February 13th, 2009 at 1:20 pm

    I got ‘Invalid parameter’ on mine. I just upgraded the ram on my macbook as well. Jeesh.

  20. 20.   Caleb Says:
    February 13th, 2009 at 1:23 pm

    >> If you thought you could outdork me, give up now.

    http://www.1234567890day.com has done just that by organizing count-down parties around the world.

  21. 21.   Guy Mac Says:
    February 13th, 2009 at 1:25 pm

    Almost as cool as entering this URL
    javascript:alert(new Date(1234567890*1e3));

  22. 22.   Caleb Says:
    February 13th, 2009 at 1:31 pm

    Try this for some more perl unix time fun:

    perl -e ‘print scalar localtime(2147483647),”\n”;’

    Note the time.

    perl -e ‘print scalar localtime(2147483648),”\n”;’

    Now check again.

  23. 23.   JB Says:
    February 13th, 2009 at 1:34 pm

    well,
    whenever I hear the quote from Hamlet..
    “to be, or not to be”
    I just think “FF”

    but thats just me
    JB

  24. 24.   iain Says:
    February 13th, 2009 at 1:34 pm

    Any parties nearby?

    http://www.1234567890day.com/

  25. 25.   Lousy Canuck » Happy 1234567890! Says:
    February 13th, 2009 at 2:15 pm

    [...] tip to Phil Plait, for reminding me of something in my own [...]

  26. 26.   Jason Thibeault Says:
    February 13th, 2009 at 2:23 pm

    Thought for sure I’d scoop you on at least this one. I can’t even hold a candle to Phil’s geekiness while fighting on my own turf!

  27. 27.   mike Says:
    February 13th, 2009 at 2:42 pm

    When it’s 4:04 I think, not found.

    When it’s 4:44 I think of the train in the Jerry Garcia Band version of Mystery Train.

  28. 28.   mike Says:
    February 13th, 2009 at 2:42 pm

    link to Mystery Train lyrics:

    http://www3.clearlight.com/~acsa/introjs.htm?/~acsa/songfile/MYSTERYT.HTM

  29. 29.   MadScientist Says:
    February 13th, 2009 at 2:59 pm

    Yeah, and my new bike just ticked past 11111.1km; I probably missed out on 12345.6 because I don’t stare at the odometer all the time.

    Anyway, for me that perl expression evaluates to:
    Sat Feb 14 10:31:30 2009 AEST
    or
    Fri Feb 13 23:31:30 2009 UTC

    @mocular: The Colorado ranges are in the WEST. BA stated he’s using a time zone in the EAST. That’s a few hours difference.

    The UNIX time that has me spooked is 2147483647. People involved with programming language and POSIX standards don’t seem to have agreed how to represent time after that date (Tue Jan 19 03:14:07 2038 UTC) or at the very least I don’t see a uniform scheme being presented in operating systems and programming languages. Fortunately all my data with times are stored in a database and will not be affected by the UNIX time problem. On the bad side, all the processing software uses the 32-bit UNIX time representation. I don’t expect my instruments to be used for that long so I’m not worried about the time representation on them.

  30. 30.   MadScientist Says:
    February 13th, 2009 at 3:03 pm

    @Caleb:

    ] export TZ=utc
    ] perl -e ‘print scalar localtime(2147483647),”\n”;’
    Tue Jan 19 03:14:07 2038
    ] perl -e ‘print scalar localtime(2147483648),”\n”;’
    Tue Jan 19 03:14:08 2038

    So – what were *you* expecting? :P ~
    I guess perl must use its own time conversion functions …

  31. 31.   mike Says:
    February 13th, 2009 at 3:21 pm

    MadScientist, you don’t have a POSIX system.

    Unix date 2147483648 is NOT in 2038. That’s 68 years and 18+ days BEFORE the Epoch. One number lower is 68 years and 18+ days after. The Epoch (localtime(0)) is
    Jan. 1, 1970.

    I have a compliant (Linux/Debian) system. I get Fri Dec 13 12:45:52 1901 (PST). This is the right answer.

  32. 32.   Caleb Says:
    February 13th, 2009 at 3:22 pm

    @MadScientist

    It could be that a later version of perl fixes this. On a few 32-bit systems, mine overflows back to 1901. Haven’t tried it on 64-bit systems.

  33. 33.   Derek Bartholomaus Says:
    February 13th, 2009 at 3:30 pm

    Okay. I don’t understand UNIX or Perl, and I don’t use the Mac Terminal, but when I copy and paste the various above command lines I keep getting the following error message: Badly placed ()’s.

    What is it supposed to do and why is it cool?

    Thanks.

  34. 34.   lagomorph Says:
    February 13th, 2009 at 3:43 pm

    Not that OS-X is real UNIX but don’t you Mac guys have date -r?
    %date -r 1234567890
    Fri Feb 13 18:31:30 EST 2009

  35. 35.   Jeroen Says:
    February 13th, 2009 at 3:45 pm

    @mike

    It has nothing to do with Posix.
    time_t is a type defined in ANSI/ISO C
    They conveniently didn’t define whether it should be signed (overflowing in 2038) or unsigned (overflowing 68 years later).
    On some platforms it is signed, on others unsigned, both are correct.

    Posix doesn’t redefine this type. So on a Posix system it can be either, and thus to be sure you should never assume it is safe to go beyond 2038.
    Most systems are being ‘fixed’ to use an unsigned value. Internally most systems already use larger (ie 64bit) values which will overflow about the same time the Sun goes kaboom.

  36. 36.   Abbie Says:
    February 13th, 2009 at 3:49 pm

    I seem to be in the unfortunate window of being nerdy enough to use linux but not nerdy enough to understand this.

  37. 37.   Jeroen Says:
    February 13th, 2009 at 3:54 pm

    @mike

    Btw, the ANSI/ISO C spec also doesn’t specify how many bits time_t should be…
    Nobody is stupid enough to make it 16bit.
    32 bits is just a often used implementation (and since programmers are idiots often working on assumptions instead of facts you can’t change this easily).
    Defining time_t to be larger than 32bit is also a valid solution. (Except that it also breaks a lot of assumptions because programmers are idiots)

    For those offended: I am a programmer….

  38. 38.   John Weiss Says:
    February 13th, 2009 at 3:58 pm

    lagomorph: Actually, it is a real Unix as of 10.5 on the Intels. (Linux, oddly, technically isn’t.)

    Abbie: it’s just that we’re about to hit second number 1234567890 after the start of the Unix system clocks. It’s like watching an odometer turn over: cool, but that’s all.

  39. 39.   TheBlackCat Says:
    February 13th, 2009 at 4:00 pm

    @ mike: that assumes a 32-bit system. On a 64-bit system the time variable is also 64 bits so there is no rollover.

  40. 40.   Mchl Says:
    February 13th, 2009 at 4:02 pm

    The 1234567890 moment has its own website (click my nick for link)

  41. 41.   lagomorph Says:
    February 13th, 2009 at 4:03 pm

    John Weiss: Well, it’s _based_ on FreeBSD but it’s been modified a lot. I’m a snob. :)

    And I wasn’t referring to Linux but OpenBSD. I haven’t used Linux in almost 10 years.

  42. 42.   John Weiss Says:
    February 13th, 2009 at 4:09 pm

    lagomorph: It doesn’t matter how snobbish you wish to be, OS X meets the Unix 03 standards and is therefore a true Unix :-) . No BSD has ever been fully compliant with the standards, as far as I know. Not that it matters or really affects how good the systems are, but to the extent that names matter, OS X is definitely Unix.

    That said, I wish they’d fix the cut and paste behavior in the bloody Xterm windows…

  43. 43.   John Weiss Says:
    February 13th, 2009 at 4:16 pm

    Er, and to be clear: that post wasn’t mean to be snarky. Re-reading it, I worry that it might sound that way. Frankly, I’m not really concerned about this issue. I’m just a Stickler for Accuracy. (Also, I sit on the Axiom Appeals Board.)

  44. 44.   Cusp Says:
    February 13th, 2009 at 4:19 pm

    >> If you have a Mac or Unix machine

    Modern macs are unix (for small values of unix)

  45. 45.   Caleb Says:
    February 13th, 2009 at 4:31 pm

    There it goes!

    http://coolepochcountdown.com/

  46. 46.   lagomorph Says:
    February 13th, 2009 at 4:35 pm

    No worries. I guess it comes down to the definition of UNIX. I’m fairly minimalist. To me, OpenBSD simply shares my goals. They adhere to standards when they make sense. They put files where they belong. They care about quality and correctness and tight code. I associate this with true, traditional UNIX. OS-X is not typically used in any way that would feel like UNIX in a traditional sense. When you probe under the hood, in my opinion, the part that is UNIX-like is a mess. It’s UNIX with a whole bunch of stuff grafted on and that “stuff” is pretty much what most users are going to interact with. It can look pretty slick on the outside though.

  47. 47.   Timothy from Boulder Says:
    February 13th, 2009 at 4:37 pm

    The Google logo this afternoon commemorates nerddom.

  48. 48.   Harold Says:
    February 13th, 2009 at 4:56 pm

    OK, now I’m confused about the “comb jelly time” comment.

  49. 49.   Harold Says:
    February 13th, 2009 at 4:57 pm

    Oh. Just sounded it out. Never mind.

  50. 50.   The Chemist Says:
    February 13th, 2009 at 5:32 pm

    Must make it to my Linux box before midnight.

  51. 51.   C. ALan Zoppa Says:
    February 13th, 2009 at 8:34 pm

    Phil, FYI—

    date +%s

    will do the trick

  52. 52.   freespace Says:
    February 13th, 2009 at 10:20 pm

    Extra dorky, pi time:

    date -r 31415926535
    Thu 25 Oct 2012 19:57:43 EST

  53. 53.   freespace Says:
    February 13th, 2009 at 10:26 pm

    date -u will output in UTC time too.

  54. 54.   John Weiss Says:
    February 13th, 2009 at 10:59 pm

    Freespace? Shouldn’t pi-time be in like 60 years? It’s taken nearly 30 to get to 1.2×10^10 seconds, shouldn’t it take nearly twice that to cover another 2×10^10?

    (Also, you have 11 digits, there. That’ll be… 1000 years?)

  55. 55.   freespace Says:
    February 13th, 2009 at 11:06 pm

    Ah, good pick up. I think my poor 32bit processor overflowed… the 11 digit pi I used is ~31x larger than the largest unsigned 32bit int can hold…

    So some one on a 64bit system can try it and let us know :P

  56. 56.   blf Says:
    February 14th, 2009 at 2:40 am

    Using GNU date(1), date –date=@1234567890 will also print the time; add –utc if you want it in UTC; or export an appropriate TZ. No reason to use perl(1) at all.

    For those of you arguing about 32-bitness, whether or not time_t is unsigned, etc., the Rationale in the original (IEEE) POSIX.1-1988 standard contained a fairly lengthy discussion of the entire subject.

  57. 57.   Perl Guy Says:
    February 14th, 2009 at 3:28 am

    It should read:

    perl -e ‘print scalar localtime(1234567890) . “\n”;’

    Replace the , with a . and change the open/close single quotes with apostrophes.

    And DAMN Phil, you should have left it in on thursday. I missed it on Friday.

  58. 58.   James McCann Says:
    February 14th, 2009 at 3:34 am

    Replacing the characters you typed with different characters – with features like that who needs bugs?

    gawk — ‘BEGIN { print strftime(“%c”, ARGV[1]) }’ 1234567890

    gives the inverse of date +%s

  59. 59.   MadScientist Says:
    February 14th, 2009 at 4:02 am

    @Mike:

    I don’t know why you say my system isn’t POSIX compliant (I haven’t checked the latest POSIX spec or proposals).

    @Caleb:

    64 bit could be the problem; I tried using GNU ‘date’ as blf suggested and I still get the naively expected time rather than the time warp. I’ve got a ‘pure’ 64-bit system on an AMD Opteron. So is it my kernel, the GNU libraries, or both. Now I don’t even know if it’s just Perl or something else in my system. Oh well, it’s not something I need to worry about at the moment. :)

  60. 60.   cardoso Says:
    February 14th, 2009 at 6:23 am

    Don’t forget the 17:01, Trek Hour.

  61. 61.   ProofByInduction Says:
    February 14th, 2009 at 8:05 am

    “If you thought you could outdork me, give up now.”

    Phil, most of the above entries leave you in the dust as to dorkiness….:-)

  62. 62.   Kid Cool Says:
    February 14th, 2009 at 9:22 am

    I surprised at all the geeks here not mentioning 11/19/1999 being the last all odd number date until 11/11/3111. Maybe 01/01/3111, but do the 0′s count?

    How about 02/02/2000 the first all even number date since 8/28/888

  63. 63.   TheBlackCat Says:
    February 14th, 2009 at 9:27 am

    @ Kid: Bah, geeks don’t car about odd numbers. Odd an even are simply a result of our arbitrary obsession with the number 2. If we had trilateral symmetry it would probably be looking for numbers that are divisible by 3. Real geeks are waiting until 2/2/2011, the next all-prime date.

  64. 64.   John B. Sandlin Says:
    February 14th, 2009 at 12:57 pm

    I get the Unix time gag. I’m not geek enough to have run the math and remembered it. I didn’t feel too bad about that… but the Crab reference got me…

    10:54 for the Crab? I had to look up the Crab.

    Star Chart gave me:
    NGC 1952 / M1 / The Crab Nebula – RA 05h 34m 31.97s / Dec. +22° 00′ 52.1″…

    Then I looked it up in Wiki….

    Oh! That’s when it went KerPow (well, the year was 1054… I don’t know what time of day…)

    I feel bad for not getting that without looking it up.

    jbs

  65. 65.   BethK Says:
    February 14th, 2009 at 1:59 pm

    Low tech geeks remember that March 14 is pi day with 1:59 adding more precision and then 26 seconds for even more. Aside: I just learned that my 13yo son knows pi to 30 digits.

    And my 15yo daughter already knew about the 1234567890 date thing.

    Where did I go right in raising them?

  66. 66.   mike Says:
    February 14th, 2009 at 2:04 pm

    I have a mac, I put that into the terminal and got a syntax error, wtf is up with that?

  67. 67.   JB Says:
    November 6th, 2010 at 6:26 pm

    Epoch? I was hoping for amusing at the very least. Dorky? OK you got me! I’ll see if I can cook up something more amusing. I’m guessing you are only in your twenties. I’m in my fifties…, all I have to do is dust off some of my time tested jokes.

    Maybe say something in programming. I’ll make it easy, I’ll use Cobol 77. I really appreciate the nomination, however, it seems that there are more prospective candidates on your end. I’m here by myself. I need reinforcements.

    I’ll keep an eye on you to see how you perform online. Oh, thanks for the compliment.

    jeff

Leave a Reply





    • About Bad Astronomy


      Phil Plait, the creator of Bad Astronomy, is an astronomer, lecturer, and author. After ten years working on Hubble Space Telescope and six more working on astronomy education, he struck out on his own as a writer. He's written two books, dozens of magazine articles, and 12 bazillion blog articles. He is a skeptic and fights the abuse of science, but his true love is praising the wonders of real science.


      The original BA site (with the Moon Hoax debunking, movie reviews, and all that) can be found here.


      Contact me: The Bad Astronomer "at" gmail "dot" com


       
      Keep Libel Laws out of Science
       
       Bad Astronomy was chosen as one of Time.com's Best Blogs of 2009.


    • Science Getaways


      Science Getaways: Vacation with your brain!


    • Subscribe to BA


      Subscribe to Bad Astronomy using RSS! RSS feed button


    • Death from the Skies!


      Order a copy of Death from the Skies! from Amazon, or Barnes and Noble.

      "If things worked the way I wanted them to, any reporter about to do another 'sensational' story on deadly meteors would consult this volume, and bang! common sense would find its way into the news. How strange would that world be?"
      -- Adam Savage, Mythbusters


      "Reading this book is like getting punched in the face by Carl Sagan. Frightening, but oddly exhilarating."
      -- Daniel H. Wilson, author of How to Survive a Robot Uprising


    • Recent Posts

      • Maiden flight for ESA’s Vega rocket tonight
      • Another interactive way to scale the Universe
      • An ear to the ocean
      • The staring eye of a crescent moon
      • A hoopy frood
    • Social/Networking/Cool Stuff


      Google+


       Twitter




       Facebook


    • Post Categories

    • Archives

    • Blogroll

      • Bad Astronomy (old site)
      • Bad Astronomy and Universe Today Forum
      • BAFacts Archive
      • Commenting Policy
      • Computer Support
      • Contact Information
      • DM: 80 Beats
      • DM: Cosmic Variance
      • DM: Discoblog
      • DM: Gene Expression
      • DM: NERS
      • DM: Science Not Fiction
      • DM: The Intersection
      • DM: The Loom
      • James Randi Educational Foundation
      • My use of the word "denier"
      • Planetary Society Blog
      • Politics and Religion posts
      • Press Kit
      • Q&BA Archive
      • The Antivax Bible
      • Universe Today
    • RSS DISCOVERmagazine.com: Latest Articles on Space

      • Maiden flight for ESA’s Vega rocket tonight | Bad Astronomy
      • Another interactive way to scale the Universe | Bad Astronomy
      • The staring eye of a crescent moon | Bad Astronomy
      • When the Moon hits your apse in a way-cool time lapse | Bad Astronomy
      • Funhouse galaxy | Bad Astronomy
    • RSS DISCOVER Blogs: The Loom

      • A Planet of Viruses: Autographed Book Sale
      • Animal Friendships: My cover story for Time magazine
      • The Future of E-books–podcast of my interview on Wisconsin Public Radio
      • Thursday, February 16: Science and social media panel in New York
      • A Scientific Jonah: My profile of Joy Reidenberg in tomorrow’s New York Times


  • Kalmbach Publishing Co.

    Copyright © 2012, Kalmbach Publishing Co.

    Privacy - Terms - Reader Services - Subscribe Today - Advertise - About Us