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
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)
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."