Subject: | ISO 8601 dates. Submitted patch was not applied to 2003.0211 |
rayg@bitbaron.com supplied a patch to handle ISO 8601 dates for 101.062101.
It appears this patch was not applied to the 2003.0211 release. I've updated the patch to work against 2003.0211, and ISO 8601 dates are now parsed properly.
*** ParseDate.pm Tue Feb 11 15:41:43 2003
--- lib/site_perl/5.6.1/Time/ParseDate.pm Tue Nov 25 11:36:42 2003
*************** sub mkoff
*** 391,397 ****
{
my($offset) = @_;
! if (defined $offset and $offset =~ s#^([-+])(\d\d)(\d\d)$##) {
return ($1 eq '+' ?
3600 * $2 + 60 * $3
: -3600 * $2 + -60 * $3 );
--- 391,397 ----
{
my($offset) = @_;
! if (defined $offset and $offset =~ s#^([-+])(\d\d):?(\d\d)$##) {
return ($1 eq '+' ?
3600 * $2 + 60 * $3
: -3600 * $2 + -60 * $3 );
*************** sub parse_tz_only
*** 407,413 ****
my $o;
if ($$tr =~ s#^
! ([-+]\d\d\d\d)
\s+
\(
"?
--- 407,413 ----
my $o;
if ($$tr =~ s#^
! ([-+]\d\d:?\d\d)
\s+
\(
"?
*************** sub parse_tz_only
*** 439,445 ****
$$tzo = &mkoff($o);
printf "matched at %d. ($$tzo, $o)\n", __LINE__ if $debug;
return 1;
! } elsif ($$tr =~ s#^(?:GMT\s*)?([-+]\d\d\d\d)(\s+|$)##x) {
$o = $1;
$$tzo = &mkoff($o);
printf "matched at %d.\n", __LINE__ if $debug;
--- 439,445 ----
$$tzo = &mkoff($o);
printf "matched at %d. ($$tzo, $o)\n", __LINE__ if $debug;
return 1;
! } elsif ($$tr =~ s#^(?:GMT\s*)?([-+]\d\d:?\d\d)(\s+|$)##x) {
$o = $1;
$$tzo = &mkoff($o);
printf "matched at %d.\n", __LINE__ if $debug;
*************** sub parse_date_only
*** 460,466 ****
$$tr =~ s#^\s+##;
! if ($$tr =~ s#^(\d\d\d\d)([-./])(\d\d?)\2(\d\d?)(\s+|$)##) {
# yyyy/mm/dd
($$yr, $$mr, $$dr) = ($1, $3, $4);
--- 460,466 ----
$$tr =~ s#^\s+##;
! if ($$tr =~ s#^(\d\d\d\d)([-./])(\d\d?)\2(\d\d?)(\s+|T|$)##) {
# yyyy/mm/dd
($$yr, $$mr, $$dr) = ($1, $3, $4);
*************** sub parse_time_only
*** 684,691 ****
(\d\d) (?# $7)
(
(?# don't barf on database sub-second timings)
! (?:\:|\.)
! \d{1,6}
)? (?# $8)
)?
)
--- 684,691 ----
(\d\d) (?# $7)
(
(?# don't barf on database sub-second timings)
! (?:.,)
! \d+
)? (?# $8)
)?
)