develooper Front page | perl.perl5.porters | Postings from July 2001

[PATCH 5.6.1] OS/2 gmtime()

Thread Next
From:
Ilya Zakharevich
Date:
July 2, 2001 03:06
Subject:
[PATCH 5.6.1] OS/2 gmtime()
Message ID:
20010702060634.A1356@math.ohio-state.edu
Apparently, EMX CRT thinks that gmtime() should have dst==-1.

Make the corresponding test be more quiet about this.

Enjoy,
Ilya

--- ./ext/Time/Piece/Piece.t-pre	Sun Jun 17 17:30:06 2001
+++ ./ext/Time/Piece/Piece.t	Mon Jul  2 01:25:42 2001
@@ -82,11 +82,14 @@ print "ok 21\n";
 
 # In GMT there should be no daylight savings ever.
 
-print "not " unless $t->isdst == 0;
-print "ok 22\n";
+my $dst = ( ((CORE::gmtime(0))[8] == -1) ? -1 : 0);	# OS/2 EMX bug
+my $dst_mess = ($dst ? ' # skipped: gmtime(0) thinks DST == -1' : '');
 
-print "not " unless $t->daylight_savings == 0;
-print "ok 23\n";
+print "not " unless $t->isdst == $dst;
+print "ok 22$dst_mess\n";
+
+print "not " unless $t->daylight_savings == $dst;
+print "ok 23$dst_mess\n";
 
 print "not " unless $t->hms eq '12:34:56';
 print "ok 24\n";

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About