[ale] Perl 5 (localtime) - Y2K issue

Zhongbin Yu " <zyu at premtec.com> Zhongbin Yu " <zyu at premtec.com>
Thu Sep 2 10:21:15 EDT 1999


I had the impression localtime is Y2K compliant when I read the perlfunc
man page about it. "$year is the number of years since 1900, that is,
$year is 123 in year 2023.".
Was is it not true?
my version is 5.004_05 maintenance trial 4
Jerry
---------------------excerpts from perlfunc man page--------------
       localtime EXPR
               Converts a time as returned by the time function
               to a 9-element array with the time analyzed for
               the local time zone.  Typically used as follows:

                   #  0    1    2     3     4    5     6     7     8
                   ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);

               All array elements are numeric, and come straight
               out of a struct tm.  In particular this means that
               $mon has the range 0..11 and $wday has the range
               0..6 with sunday as day 0.  Also, $year is the
               number of years since 1900, that is, $year is 123
               in year 2023.


Jerry Yu
----------------------------------------------------------------------------
Systems Engineer	| zyu at tc.net
Premiere Technologies	| 404-262-8544(O)	1-800-979-1105 (P)
Atlanta, GA 30326	| ae.tc.net/dept/engineering/op/public/developer/zyu

On Thu, 2 Sep 1999, Russell Enderby wrote:

#Does anyone know if Perl 5.x is going to fix the localtime problem for
#y2k?  Currently for the year it just subtracts 1900 from the year.  This
#will be a major problem and affect CGI's all over.  It is easy to
#manually fuge it to work but would be nice if a new localtime we updated
#fixing this in Perl.
#
#Anyone know anything about this?
#
#Russell
#
#--
#Russell T. Enderby                                        Arris
#Interactive
#Software Engineer                                         3871 Lakefield
#Dr, Suite 300
#Cornerstone Software Development Group   Suwanee, GA 30024-1242
#Email: Russell.Enderby at arris-i.com
#
#






More information about the Ale mailing list