Subject: | Bug using Mar 31, 2009 date |
Date: | Mon, 6 Apr 2009 14:59:38 -0400 |
To: | <bug-time-local [...] rt.cpan.org> |
From: | stan nats <stan767 [...] hotmail.com> |
I'm using Perl version 5.8.7 and Local.pm version 1.11 and version 1.1901 and both tell me that using March 31, 2009 is an invalid day-of-month:
Perl Program:
#!...
use Time::Local;
$time1 = timelocal(0,0,0,31,3,2009);
print $time1;
Output:
Day '31' out of range 1..30 at prog.pl line 4
I noticed that in line 118 of Local.pm
my $md = $MonthDays[$month];
should be:
my $md = $MonthDays[$month-1];
since the offset to the array starts at 0 and not 1;
Stan.
Show quoted text
_________________________________________________________________
Internet Explorer 8 helps keep your personal info safe.
http://go.microsoft.com/?linkid=9655581