|
From: Jonathan S. <gel...@ge...> - 2001-12-01 18:04:59
|
On Sat, 1 Dec 2001, grinder wrote: > Hello list, > > I downloaded the countdown script, because it seemed like > a good place to start. My idea is to run all of the nms > scripts on http://grinder.perlmonk.org/ to give them a bit > of a shakeout. > > So I configured the date to be 1/1/3001, the countdown to > the next millenium. Ran the script. Date has passed. > > Huh? > > Then it struck me... the date is based on epoch seconds. > So I set the countdown to the end of the epoch. I can > just about recite it from memory, 19/1/2038 and a few > hours more. > > Date has passed. > > Turns out, something somewhere is cutting the dates off > at an arbitrary limit: 23:59:29 31/12/2037. > > One other point: '%c' as a strftime date specifier is a > little cryptic. I would tend to prefer '%H:%M:%S %d/%m/%Y'. > Regardless of the broken way Americans deal with dates, > this is a little more self-documenting and therefore > would probably let people modify the format string > without having to read the man page. > > Here's the thing though. The 2038 limit is a little feeble. Unfortunately it is a fixed limit in the implementation of most operating systems (this is not Perl's fault). The time_t variable is (in most implementations) a 32 bit variable which (if defined as starting at 01/01/1970 as it is in POSIX ) runs out sometime in April 2038. I guess we should document this but thats about it I'm afraid ... /J\ -- Jonathan Stowe | <http://www.gellyfish.com> | This space for rent | |