summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl/lib/Time
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-04-23 21:46:20 +0000
committerKarl Berry <karl@freefriends.org>2014-04-23 21:46:20 +0000
commit300c1eb6d37d46078d448d6d58938d5a80cd68ff (patch)
tree23a0a8b9f8f5460b405119c4d3c163d2d488ca5e /Master/tlpkg/tlperl/lib/Time
parented55d86b7c5e18f6eccce80a1fb1423ca40a23b5 (diff)
(tl)perl 5.18.2 for windows from siep
git-svn-id: svn://tug.org/texlive/trunk@33648 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Time')
-rw-r--r--Master/tlpkg/tlperl/lib/Time/Local.pm16
1 files changed, 8 insertions, 8 deletions
diff --git a/Master/tlpkg/tlperl/lib/Time/Local.pm b/Master/tlpkg/tlperl/lib/Time/Local.pm
index 0e9c4ac467c..ecdedef3dd8 100644
--- a/Master/tlpkg/tlperl/lib/Time/Local.pm
+++ b/Master/tlpkg/tlperl/lib/Time/Local.pm
@@ -6,7 +6,7 @@ use Config;
use strict;
use vars qw( $VERSION @ISA @EXPORT @EXPORT_OK );
-$VERSION = '1.2000';
+$VERSION = '1.2300';
@ISA = qw( Exporter );
@EXPORT = qw( timegm timelocal );
@@ -109,14 +109,14 @@ sub timegm {
if $month > 11
or $month < 0;
- my $md = $MonthDays[$month];
+ my $md = $MonthDays[$month];
++$md
if $month == 1 && _is_leap_year( $year + 1900 );
croak "Day '$mday' out of range 1..$md" if $mday > $md or $mday < 1;
croak "Hour '$hour' out of range 0..23" if $hour > 23 or $hour < 0;
croak "Minute '$min' out of range 0..59" if $min > 59 or $min < 0;
- croak "Second '$sec' out of range 0..59" if $sec > 59 or $sec < 0;
+ croak "Second '$sec' out of range 0..59" if $sec >= 60 or $sec < 0;
}
my $days = _daygm( undef, undef, undef, $mday, $month, $year );
@@ -125,10 +125,10 @@ sub timegm {
my $msg = '';
$msg .= "Day too big - $days > $MaxDay\n" if $days > $MaxDay;
- $year += 1900;
+ $year += 1900;
$msg .= "Cannot handle date ($sec, $min, $hour, $mday, $month, $year)";
- croak $msg;
+ croak $msg;
}
return $sec
@@ -201,8 +201,8 @@ Time::Local - efficiently compute time from local and GMT time
=head1 SYNOPSIS
- $time = timelocal($sec,$min,$hour,$mday,$mon,$year);
- $time = timegm($sec,$min,$hour,$mday,$mon,$year);
+ $time = timelocal( $sec, $min, $hour, $mday, $mon, $year );
+ $time = timegm( $sec, $min, $hour, $mday, $mon, $year );
=head1 DESCRIPTION
@@ -239,7 +239,7 @@ C<timegm_nocheck()>. These variants must be explicitly imported.
use Time::Local 'timelocal_nocheck';
# The 365th day of 1999
- print scalar localtime timelocal_nocheck 0,0,0,365,0,99;
+ print scalar localtime timelocal_nocheck( 0, 0, 0, 365, 0, 99 );
If you supply data which is not valid (month 27, second 1,000) the
results will be unpredictable (so don't do that).