The Quickly Descending Unix Timestamp
Teach writes: "If my calculations are correct, on Thursday, April 19, 2001, at 04:25:21 UTC (00:25:21 EDT and late Wednesday at 21:25:21 PDT), the UNIX clock will read 987654321, which is pretty cool. This will be the first of two such "significant" events in 2001, the second being 01:46:39 UTC on 2001-09-09, when the clock will read 999999999 (and then of course "roll over" to 1000000000 one second later). Use the Time Zone Converter to help you figure out when this will occur in your area, or read up on other
critical dates (such as when the 32-bit signed UNIX clock overflows in 2038)."
Not many programs are gonna care how many digits are in a timestamp, but I bet some do try to format stuff assuming a less-than-one-billion-seconds-since-epoch time.
Review your code?
[
Fortunately, the Unix internal clock works in a manner very similar to the odometer on the Slashdot Cruiser. When you go to trade in your Unix system and step up to Windows, all you have to do is crack open the little block box inside your machine and roll it back several hundred thousand milliseconds.
Nobody will know the difference save the occasional hidden-camera "consumer protection" reporterette. These people seem to have nothing better to do than spy on semi-honest computer salesman and publicly humiliate them for the crime of trying to feed their families. We could talk about the silliness of having to disclose whether or not your computer had its case straightened after a minor plastic-bender, but that would be a whole nother post....
Got a full tank of hot grits and a penis bird in the glove box.
So, you have a UNIX timestamp you want to check out? Try Perl on the command-line:
perl -MPOSIX -le 'print ctime(999999999)'
perl -MPOSIX -le 'print ctime(987654321)'
For another timezone, you can just set the TZ environment variable. On the command-line, or in the code:
perl -MPOSIX -le '$ENV{TZ}="CST";print ctime(200)'
Actually, because there are historical reasons for ctime supplying a newline, you can drop the "l" from "-le".
perl -le 'print scalar gmtime(999999999)'
And of course localtime() for your own timezone.
Liberty in your lifetime
> Thursday, April 19, 2001 ... the UNIX clock will read 987654321, which is pretty cool.
OK, but when are we going to get the Slashdot User #987654321 throw-down troll account?
We went from 100000 to 400000 so fast that I wouldn't expect it to take too much longer.
--
Sheesh, evil *and* a jerk. -- Jade
In case you were wondering, unixtime 123456789 occured on
Thu Nov 29 13:33:09 1973
(please do not waste mod points on this post, thanks)
Then we call it 'Knowledge Base article Q216641' (after quickly working out how long 2**32 milliseconds is)...
Unfortunately you don't have until 2038 in this case.
I dunno, but that sounds like one of the best excuses for a geek party I've ever heard.
;-)
Heck, that might even be a big enough party to be called a "Conference."
... with the command:
watch -n 1 date +%s
or better yet:
watch -n 1 'echo "The time is near: `date +%s`"'
I can't wait for the MSNBC story about this one.
Redmond WA.
Today Bill Gates announced that all *nix systems will halt with the September 9th coming of the S1B bug. MSNBC recommends that all *nix users switch to Windows XP before it is too late. Steve Balmer was reported to say how amazed he was that *nix could be so short sighted. XP was designed to be S1B compliant right from the start (after installing SP8 due sometime in September). All you Windows users will be kept safe from this, and should not consider going to any rogue operating systems at this time.