summaryrefslogtreecommitdiff
path: root/lib/Time
diff options
context:
space:
mode:
authorDave Rolsky <autarch@urth.org>2005-08-16 06:22:20 -0500
committerSteve Hay <SteveHay@planit.com>2005-08-17 14:33:00 +0000
commit93a047328e714ace2986c9ffb3515b4bf0939bfd (patch)
tree3f46d8fdc5abd9a6324a573530a6020e6c9b3910 /lib/Time
parent2b54f59ff973752abae83d93b744e48e13815b05 (diff)
downloadperl-93a047328e714ace2986c9ffb3515b4bf0939bfd.tar.gz
Your bug reports for Time::Local
Message-ID: <Pine.LNX.4.61.0508161120520.26270@urth.org> An improvement on change 25287 from Dave Rolsky p4raw-id: //depot/perl@25300
Diffstat (limited to 'lib/Time')
-rwxr-xr-xlib/Time/Local.t12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/Time/Local.t b/lib/Time/Local.t
index ed23fca223..288dcb6177 100755
--- a/lib/Time/Local.t
+++ b/lib/Time/Local.t
@@ -53,7 +53,10 @@ my @neg_time =
[ 1950, 04, 12, 9, 30, 31 ],
);
-my $neg_epoch_ok = defined ((localtime(-3600))[0]) ? 1 : 0;
+# Use 3 days before the start of the epoch because with Borland on
+# Win32 it will work for -3600 _if_ your time zone is +01:00 (or
+# greater).
+my $neg_epoch_ok = defined ((localtime(-259200))[0]) ? 1 : 0;
# use vmsish 'time' makes for oddness around the Unix epoch
if ($^O eq 'VMS') {
@@ -61,13 +64,6 @@ if ($^O eq 'VMS') {
$neg_epoch_ok = 0; # time_t is unsigned
}
-# Borland compiler sets $neg_epoch_ok differently depending on the
-# current Time Zone in use on the machine, but it should always be
-# set to 0.
-if ($^O eq 'MSWin32' and $Config{ccname} eq 'bcc32') {
- $neg_epoch_ok = 0;
-}
-
my $tests = (@time * 12);
$tests += @neg_time * 12;
$tests += @bad_time;