Subject: | String with TZ -0700 fails to parse, unless.. |
From Facebook's Graph API: "2011-04-30T10:00:00-0700" fails to parse in v0.08:
perl -MDateTime::Format::ISO8601 -le'print DateTime::Format::ISO8601->new()->parse_datetime("2011-04-30T10:00:00-0700")'
Invalid date format: 2011-04-30T10:00:00-0700 at -e line 1.
If I change "length" in this section:
{
#YYYYMMDDThhmmss[+-]hhmm 19850412T101530+0400
#YYYY-MM-DDThh:mm:ss[+-]hh:mm 1985-04-12T10:15:30+04:00
length => [ qw( 20 25 ) ],
regex => qr/^ (\d{4}) -?? (\d\d) -?? (\d\d)
T (\d\d) :?? (\d\d) :?? (\d\d) ([+-] \d\d :?? \d\d) $/x,
params => [ qw( year month day hour minute second time_zone ) ],
postprocess => \&_normalize_offset,
},
to:
length => [ qw( 20 24 25 ) ],
then it parses fine..