For those of you who don't know, this Saturday evening is a somewhat interesting milestone in computing history. It is the day that the unix timestamp (i.e. the value that time() returns) rolls over to 1,000,000,000.

This afternoon, a mailing list I'm on received a one-liner from our departed abigail about it. We started chatting about it in the CB and decided that there should be some sort of repository here for nifty scripts (and/or discussions, etc) relating to this event.

So, here are a few that we came up with:

# show the current unix timestamp perl -le 'print time' # prints the rollover moment for your timezone (from ChemBoy) perl -le 'print scalar localtime 1e9' # count up to rollover (from abigail) perl -le 'sleep 1 while print time' # count down to rollover perl -le 'sleep 1 while print 1e9-time' # count in both direction on a vt100 term (modified from one of MrNobo +1024's) clear; perl -le 'sleep 1 while print "\e[1A", 1e9 - time, " ==> ", tim +e'
Oh, and the EFF is having a Music Share-In Festival in SF's Golden Gate Park that day. Its possible that a unix-rollover party might break out in the middle of it, so if you're in the area, I invite you to stop by and enjoy yourself.

-Blake

Replies are listed 'Best First'.
Re: A billion seconds of Unix
by George_Sherston (Vicar) on Sep 07, 2001 at 13:40 UTC
    Great idea. It would be super to have a central repository of Ie9 commemorative stuff. At the risk of taking the wrong side of the conversation, perhaps I might add this link to a commemorative JAPE (not a misprint). A goodish idea executed with primitive skill; but I hope more capable artists will give it a wherl. (NB if it seems to make no sense when you run it, please don't despair, but think about when you are running it.)

    § George Sherston
Re: A billion seconds of Unix
by mdillon (Priest) on Sep 07, 2001 at 19:09 UTC
    not only is it possible, but, in fact, my friend Seth (who works for EFF) is planning to have a 1e9 seconds of UNIX celebration at the be-in right after the music ends. i believe he said it would begin around 6:41 p.m. PDT.
Re: A billion seconds of Unix
by miyagawa (Chaplain) on Sep 07, 2001 at 21:59 UTC
      Thats a good link.... timestamps will no longer sort correctly when they are 'cmp'ed instead of '<=>'ed. ((10 cmp 9)  != (10 <=> 9)) I had only considered the extra-digit issue, but sorting is probably a bigger problem since 'cmp' is the default and it worked fine in the past.
      #!/usr/bin/perl -wT use strict; my @a = (5..15); print "cmp comparison of 9 and 10: ", 10 cmp 9, "\n"; print "<=> comparison of 9 and 10: ", 10 <=> 9, "\n"; print "\n"; print "cmp sort of 5..15: ", join(' ',(sort @a)), "\n"; print "<=> sort of 5..15: ", join(' ',(sort {$a<=>$b} @a)), "\n"; =output cmp comparison of 9 and 10: -1 <=> comparison of 9 and 10: 1 cmp sort of 5..15: 10 11 12 13 14 15 5 6 7 8 9 <=> sort of 5..15: 5 6 7 8 9 10 11 12 13 14 15

      -Blake