[WEB4LIB] Re: formmail.pl and non-Y2K cgi scripts

thrall12 u1013066 at warwick.net
Tue Nov 16 12:52:18 EST 1999


Darryl Friesen wrote:

> The year returned by the localtime() function is the number of years since
> 1900.  So in 2000 the number returned will be 100.  To get a full 4 digit
> year you must add 1900.

If this true of all PERL distributions, then that is great.
However, there is a DOS distribution which has some
documentation that may (may: I do not know) imply
problems with localtime():

    "Localtime() gives a time() value (see below) based
    on the current DOS clock time. Gmtime() has a fixed
    offset from localtime(); since DOS doesn't support
    the UNIX time zone system, the offset depends
    on the assumptions compiled into your copy of Perl."

As I doubt many critical servers are running DOS
distributions of PERL these days, this may not
present major problems--or no problem at all if
localtime() is reported correctly either by itself
or via an upgraded system with newer BIOS or
a RTC/rollover driver.

For the complete documentation where the above
quote  comes from, please see:
http://www.perl.com/CPAN-local/ports/msdos/tips-tricks/dos_perl.txt

Robert
thrall12 at warwick.net




More information about the Web4lib mailing list