However, I am still seeing the following failures with Win32/VC++:
t\04epoch.t 255 65280 28 3 10.71% 26-28 t\20infinite.t 3 768 36 3 8.33% 12-14
even after installing the updated Time::Local from CPAN.
Specifically, the first failure is this block:
{
my $dt = DateTime->from_epoch( epoch => -2082844800 ); #fails here
is( $dt->year, 1904, 'year should be 1904' );
is( $dt->month, 1, 'month should be 1904' );
is( $dt->day, 1, 'day should be 1904' );
}
which fails because this code in from_epoch():
@args{ qw( second minute hour day month year ) } =
( gmtime( delete $p{epoch} ) )[ 0..5 ];
does not, in fact initialize anything in the %args hash:
%args = (
"month" => undef,
"day" => undef,
"minute" => undef,
"year" => undef,
"hour" => undef,
"second" => undef
);
Apparently M$loth's implementation of gmtime() doesn't support negative numbers _at all_:
D:\working\DateTime-0.12>perl -e "print '<'.scalar gmtime(1).'>'" <Thu Jan 1 00:00:01 1970> D:\working\DateTime-0.12>perl -e "print '<'.scalar gmtime(-1).'>'" <>
even though time_t is defined as a long integer (not unsigned long):
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/HTML/_crt_mktime.asp
MORONS!
Anyone up to creating a POSIX compliant gmtime() out of whole cloth for the poor souls running Win32??? I guess that could be included in Time::Local...
I'll move on to the t\20infinite.t failures next.
John
-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4501 Forbes Boulevard Suite H Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5748
