summaryrefslogtreecommitdiff
path: root/lib/Time/gmtime.t
diff options
context:
space:
mode:
authorMichael G. Schwern <schwern@pobox.com>2008-10-04 18:24:54 -0400
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-01-03 18:39:16 +0100
commit461d5a49bcaf1bdc023edb10ef9b6c0606ec0131 (patch)
treeb320c5fc7d5618b148e9437543445ba6ec23e764 /lib/Time/gmtime.t
parentb86b480f7301a8816081189c89b366a79ab9909f (diff)
downloadperl-461d5a49bcaf1bdc023edb10ef9b6c0606ec0131.tar.gz
Update from y2038.
Add trace code. Fix implied negative time in localtie64_r(). This fixes Windows. Put in some more tests around small negative and positive times to try and catch the above. Explain the loss of accuracy due to use of doubles in perlport.
Diffstat (limited to 'lib/Time/gmtime.t')
-rw-r--r--lib/Time/gmtime.t3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Time/gmtime.t b/lib/Time/gmtime.t
index 1ccd7fb826..9c77f81570 100644
--- a/lib/Time/gmtime.t
+++ b/lib/Time/gmtime.t
@@ -9,7 +9,7 @@ BEGIN {
my(@times, @methods);
BEGIN {
- @times = (-2**33, -2**31-1, 0, 2**31-1, 2**33, time);
+ @times = (-2**62, -2**50, -2**33, -2**31-1, -1, 0, 1, 2**31-1, 2**33, 2**50, 2**62, time);
@methods = qw(sec min hour mday mon year wday yday isdst);
plan tests => (@times * @methods) + 1;
@@ -17,7 +17,6 @@ BEGIN {
use_ok Time::gmtime;
}
-# Perl has its own gmtime() so it's safe to do negative times.
for my $time (@times) {
my $gmtime = gmtime $time; # This is the OO gmtime.
my @gmtime = CORE::gmtime $time; # This is the gmtime function