diff options
author | Achim Bohnet <ach@rosat.mpe-garching.mpg.de> | 1996-11-19 19:54:23 +0100 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1996-11-26 20:48:00 +1200 |
commit | 0c160758284dfc4a4cd244aaba0bc284f6220eb4 (patch) | |
tree | 1772fd64a97a3d5d50926ee95170f183d54f4fbe /lib/Time | |
parent | d1f8c7a45dc381aadd1554d536a49dff9ab0c3d5 (diff) | |
download | perl-0c160758284dfc4a4cd244aaba0bc284f6220eb4.tar.gz |
minimal timelocal.pl for _09
private-msgid: <9611191854.AA19586@o09.rosat.mpe-garching.mpg.de>
Diffstat (limited to 'lib/Time')
-rw-r--r-- | lib/Time/Local.pm | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lib/Time/Local.pm b/lib/Time/Local.pm index 2bdf23cb1b..0119f9ddb8 100644 --- a/lib/Time/Local.pm +++ b/lib/Time/Local.pm @@ -88,16 +88,11 @@ sub cheat { $year -= 1900 if $year > 1900; $month = $_[4]; - croak "Month out of range 0..11 in timelocal.pl" - if $month > 11 || $month < 0; - croak "Day out of range 1..31 in timelocal.pl" - if $_[3] > 31 || $_[3] < 1; - croak "Hour out of range 0..23 in timelocal.pl" - if $_[2] > 23 || $_[2] < 0; - croak "Minute out of range 0..59 in timelocal.pl" - if $_[1] > 59 || $_[1] < 0; - croak "Second out of range 0..59 in timelocal.pl" - if $_[0] > 59 || $_[0] < 0; + croak "Month '$month' out of range 0..11" if $month > 11 || $month < 0; + croak "Day '$_[3]' out of range 1..31" if $_[3] > 31 || $_[3] < 1; + croak "Hour '$_[2]' out of range 0..23" if $_[2] > 23 || $_[2] < 0; + croak "Minute '$_[1]' out of range 0..59" if $_[1] > 59 || $_[1] < 0; + croak "Second '$_[0]' out of range 0..59" if $_[0] > 59 || $_[0] < 0; $guess = $^T; @g = gmtime($guess); $year += $YearFix if $year < $epoch; |