On Wed Nov 15 04:44:13 2006, MSCHWERN wrote:
Show quoted text> $ perl -MDateTime::Format::ISO8601 -wle '$dt =
> DateTime::Format::ISO8601->new; $dt->parse_datetime( "2006-11-15
> 04:32:51" )'
> Invalid date format: 2006-11-15 04:32:51 at -e line 1
>
> $ perl -MDateTime::Format::ISO8601 -wle
> 'DateTime::Format::ISO8601->parse_datetime( "2006-11-15 04:32:51" )'
> Invalid date format: 2006-11-15 04:32:51 at -e line 1
It's my belief that is not a valid ISO8601 format. Although, it is in
common use by MySQL, apache, etc. AFAIK none of those projects claim
that it's an ISO8601 format either. Several other DT::F parser
understand that format including DT::F::MySQL & DT::F::HTTP so I'm not
sure it's worth while for DT::F::ISO8601 to accept a non-standard format
even if they are in common use.
Show quoted text> That should be a valid ISO date. The T separator should be optional and
> is documented as such in the man page.
>
> This is ISO8601 0.0403 + DateTime 0.35.
The manual doesn't state that for section 5.4 format times. The
standard says in a foot note: "NOTE By mutual agreement of the
partners in information interchange, the character [T] may be omitted in
applicationswhere there is no risk of confusing a combined date and time
of the day representation with others defined in this International
Standard." When "ommited" is used else where in the standard it doesn't
mean "can be replaced with a space". In deed, non of the provided
examples use a space in that manner. So "2006-11-1504:32:51" is a valid
format but only if a special agreement has been made between the
exchanging parties. I'd be willing to change the parser to allow the T
to be "ommited" in all of the section 5.4 formats if you like.