Don't ask to ask, just ask | |
PerlMonks |
Re: Why does localtime() return 1900-$YEAR?by bart (Canon) |
on Jan 31, 2011 at 12:00 UTC ( [id://885255]=note: print w/replies, xml ) | Need Help?? |
It's $year-1900, not 1900-$year.
And it's a fix for an old custom that started a long time ago (70s - 80s) when they thought "2-digit years should be enough for any date". So when 2000 came along, they had a problem. Replacing 2 digit years with years since 1900 was the easiest, backward compatible fix.
In Section
Seekers of Perl Wisdom
|
|