Change 14777 by ams@lustre on 2002/02/20 00:56:21
Subject: [PATCH] Re: Cannot handle date (0, 0, 0, 2, 0, 1970)
From: Graham Barr <[EMAIL PROTECTED]>
Date: Tue, 19 Feb 2002 23:08:47 +0000
Message-Id: <[EMAIL PROTECTED]>
Affected files ...
.... //depot/perl/lib/Time/Local.pm#24 edit
Differences ...
==== //depot/perl/lib/Time/Local.pm#24 (text) ====
Index: perl/lib/Time/Local.pm
--- perl/lib/Time/Local.pm.~1~ Tue Feb 19 18:00:05 2002
+++ perl/lib/Time/Local.pm Tue Feb 19 18:00:05 2002
@@ -2,10 +2,11 @@
use 5.006;
require Exporter;
use Carp;
+use Config;
use strict;
use integer;
-our $VERSION = '1.03';
+our $VERSION = '1.04';
our @ISA = qw( Exporter );
our @EXPORT = qw( timegm timelocal );
our @EXPORT_OK = qw( timegm_nocheck timelocal_nocheck );
@@ -25,10 +26,8 @@
my $Epoc = 0; $Epoc = _daygm(gmtime(0));
%Cheat=(); # clear the cache as epoc has changed
-my $MaxDay = do {
- no integer;
- int((~0>>1-43200)/86400)-1;
-};
+my $MaxInt = ((1<<(8 * $Config{intsize} - 2))-1)*2 + 1;
+my $MaxDay = int(($MaxInt-43200)/86400)-1;
sub _daygm {
End of Patch.