[ale] Perl 5 (localtime) - Y2K issue

Chris Hamilton chrish at realminfo.com
Thu Sep 2 10:41:40 EDT 1999


> 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?

I'm not sure I understand this problem. Once 2000 hits, the year will be
represented as 100. In 2001, it will be 101 and so forth.

Taken from:
	"perlfaq4 - Does Perl have a year 2000 problem? Is Perl Y2K 	compliant?"

	When gmtime() and localtime() are used in scalar context
	they return a timestamp string that contains a fully-
	expanded year. For example, $timestamp =
	gmtime(1005613200) sets $timestamp to "Tue Nov 13 01:00:00
	2001". There's no year 2000 problem here.

Continuing ...

	That doesn't mean that Perl can't be used to create non-
	Y2K compliant programs. It can. But so you can your pencil.
	It's the fault of the user, not the language. At the risk
	of inflaming the NRA: ``Perl doesn't break Y2K, people
	do.'' See http://language.perl.com/news/y2k.html for a
	longer exposition.




--
Chris Hamilton          Manager, Information Technology Services
chrish at realminfo.com    REALM Information Technologies






More information about the Ale mailing list