
Jasmine
Administrator
/ Moderator
Dec 20, 1999, 7:55 PM
Post #1 of 2
(744 views)
|
|
$year += 1900 is Y2K Compliant
|
Can't Post
|
|
Fair warning... check your programs. Many programmers have changed ($sec,$min,$hour,$day,$mon,$year,$wday) = localtime(time); $year += 1900; to ($sec,$min,$hour,$day,$mon,$year,$wday) = localtime(time); $year += 2000; in their date subroutine because it looks Y2K compliant. This assumption is incorrect. The localtime function returns the number of years since 1900. In 2000, localtime will return 100, not 00. So, $year += 1900; #equals 2000 $year += 2000; #equals 2100 A more detailed explanation is at http://www.perlarchive.com/tlc/9912/01.shtml Cheers! [This message has been edited by Jasmine (edited 12-20-1999).]
|