Hi John, [snipped]
> 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_: > yep!! I just figured that out myself with this: use warnings; use strict; use diagnostics; use Time::Local; my $time = timegm(1,1,1,1,1,1969); print $time ."\n"; my $now = gmtime($time) or die"$?"; #my $now = gmtime(-2082844800) or die"$@"; print $now; fails horrably on windows :( I posted this on CLPM maybe someone has something on this. > 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... Outch !! Ron Hill