diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/HTTP/Date.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/HTTP/Date.pm | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Master/tlpkg/tlperl/lib/HTTP/Date.pm b/Master/tlpkg/tlperl/lib/HTTP/Date.pm index 7756214af98..d05d21605ae 100644 --- a/Master/tlpkg/tlperl/lib/HTTP/Date.pm +++ b/Master/tlpkg/tlperl/lib/HTTP/Date.pm @@ -1,8 +1,7 @@ package HTTP::Date; -$VERSION = "5.831"; +$VERSION = "6.02"; -require 5.004; require Exporter; @ISA = qw(Exporter); @EXPORT = qw(time2str str2time); @@ -107,7 +106,7 @@ sub parse_date ($) \s* ([-+]?\d{2,4}|(?![APap][Mm]\b)[A-Za-z]+)? # timezone \s* - (?:\(\w+\))? # ASCII representation of timezone in parens. + (?:\(\w+\)|\w{3,})? # ASCII representation of timezone. \s*$ /x) @@ -316,13 +315,13 @@ to get the date recognized. This function will try to parse a date string, and then return it as a list of numerical values followed by a (possible undefined) time zone specifier; ($year, $month, $day, $hour, $min, $sec, $tz). The $year -returned will B<not> have the number 1900 subtracted from it and the -$month numbers start with 1. +will be the full 4-digit year, and $month numbers start with 1 (for January). In scalar context the numbers are interpolated in a string of the "YYYY-MM-DD hh:mm:ss TZ"-format and returned. -If the date is unrecognized, then the empty list is returned. +If the date is unrecognized, then the empty list is returned (C<undef> in +scalar context). The function is able to parse the following formats: |