On Wed, 4 Jun 2003, John Peacock wrote:

> The t/13strftime.t file has DOS line endings, which causes all tests to fail
> under Cygwin.  If that is corrected, then Cygwin tests completely clean.

Really?  I can't see them.

> 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!

Indeed.  I guess I'll just skip those tests on Win32 for now.


-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/

Reply via email to