Change 19702 by [EMAIL PROTECTED] on 2003/06/06 23:00:00

        Upgrade to Time::Local 1.06, by Dave Rolsky

Affected files ...

... //depot/perl/lib/Time/Local.pm#28 edit
... //depot/perl/lib/Time/Local.t#6 edit

Differences ...

==== //depot/perl/lib/Time/Local.pm#28 (text) ====
Index: perl/lib/Time/Local.pm
--- perl/lib/Time/Local.pm#27~18497~    Thu Jan 16 12:40:58 2003
+++ perl/lib/Time/Local.pm      Fri Jun  6 16:00:00 2003
@@ -1,15 +1,16 @@
 package Time::Local;
-use 5.006;
+
 require Exporter;
 use Carp;
 use Config;
 use strict;
 use integer;
 
-our $VERSION    = '1.04';
-our @ISA       = qw( Exporter );
-our @EXPORT    = qw( timegm timelocal );
-our @EXPORT_OK = qw( timegm_nocheck timelocal_nocheck );
+use vars qw( $VERSION @ISA @EXPORT @EXPORT_OK );
+$VERSION    = '1.06';
[EMAIL PROTECTED]       = qw( Exporter );
[EMAIL PROTECTED]       = qw( timegm timelocal );
[EMAIL PROTECTED]       = qw( timegm_nocheck timelocal_nocheck );
 
 my @MonthDays = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
 
@@ -169,8 +170,11 @@
 
 These routines are the inverse of built-in perl functions localtime()
 and gmtime().  They accept a date as a six-element array, and return
-the corresponding time(2) value in seconds since the Epoch (Midnight,
-January 1, 1970).  This value can be positive or negative.
+the corresponding time(2) value in seconds since the system epoch
+(Midnight, January 1, 1970 UTC on Unix, for example).  This value can
+be positive or negative, though POSIX only requires support for
+positive values, so dates before the system's epoch may not work on
+all operating systems.
 
 It is worth drawing particular attention to the expected ranges for
 the values provided.  The value for the day of the month is the actual day
@@ -261,6 +265,25 @@
 The whole scheme for interpreting two-digit years can be considered a bug.
 
 The proclivity to croak() is probably a bug.
+
+=head1 SUPPORT
+
+Support for this module is provided via the [EMAIL PROTECTED]
+email list.  See http://lists.perl.org/ for more details.
+
+Please submit bugs using the RT system at bugs.perl.org, the perlbug
+script, or as a last resort, to the [EMAIL PROTECTED] list.
+
+=head1 AUTHOR
+
+This module is based on a Perl 4 library, timelocal.pl, that was
+included with Perl 4.036, and was most likely written by Tom
+Christiansen.
+
+The current version was written by Graham Barr.
+
+It is now being maintained separately from the Perl core by Dave
+Rolsky, <[EMAIL PROTECTED]>.
 
 =cut
 

==== //depot/perl/lib/Time/Local.t#6 (xtext) ====
Index: perl/lib/Time/Local.t
--- perl/lib/Time/Local.t#5~18497~      Thu Jan 16 12:40:58 2003
+++ perl/lib/Time/Local.t       Fri Jun  6 16:00:00 2003
@@ -1,8 +1,10 @@
 #!./perl
 
 BEGIN {
-    chdir 't' if -d 't';
-    @INC = '../lib';
+  if ($ENV{PERL_CORE}){
+    chdir('t') if -d 't';
+    @INC = ('.', '../lib');
+  }
 }
 
 use Time::Local;
@@ -28,7 +30,10 @@
 # use vmsish 'time' makes for oddness around the Unix epoch
 if ($^O eq 'VMS') { $time[0][2]++ }
 
-print "1..", @time * 2 + 6, "\n";
+my $tests = @time * 2 + 4;
+$tests += 2 if $ENV{PERL_CORE};
+
+print "1..$tests\n";
 
 $count = 1;
 for (@time) {
@@ -98,7 +103,6 @@
 # 03:00:00. In this case, 02:00:00 is an invalid time, and should be
 # treated like 03:00:00 rather than 01:00:00 - negative zone offsets used
 # to do the latter
-
 {
     my $hour = (localtime(timelocal(0, 0, 2, 7, 3, 102)))[2];
     # testers in US/Pacific should get 3,
@@ -107,12 +111,13 @@
     print "ok ", $main::count++, "\n";
 }
 
+if ($ENV{PERL_CORE}) {
+  #print "Testing timelocal.pl module too...\n";
+  package test;
+  require 'timelocal.pl';
+  timegm(0,0,0,1,0,80) == main::timegm(0,0,0,1,0,80) or print "not ";
+  print "ok ", $main::count++, "\n";
 
-#print "Testing timelocal.pl module too...\n";
-package test;
-require 'timelocal.pl';
-timegm(0,0,0,1,0,80) == main::timegm(0,0,0,1,0,80) or print "not ";
-print "ok ", $main::count++, "\n";
-
-timelocal(1,2,3,4,5,88) == main::timelocal(1,2,3,4,5,88) or print "not ";
-print "ok ", $main::count++, "\n";
+  timelocal(1,2,3,4,5,88) == main::timelocal(1,2,3,4,5,88) or print "not ";
+  print "ok ", $main::count++, "\n";
+}
End of Patch.

Reply via email to