This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Your bug reports for Time::Local
[perl5.git] / lib / Time / Local.t
index ed23fca..288dcb6 100755 (executable)
@@ -53,7 +53,10 @@ my @neg_time =
      [ 1950, 04, 12, 9, 30, 31 ],
     );
 
      [ 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') { 
 
 # 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
 }
 
     $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;
 my $tests = (@time * 12);
 $tests += @neg_time * 12;
 $tests += @bad_time;