Which DateTime module is best for manipulating an XML date and time
I am trying to parse a date from a GPX (XML track format) that looks like 2009-08-02T12:11:06Z
My initial approach was to use DateTime::Format::RFC3339
But DateTime:Format::XSD seems to do a similar job.
Is there a difference betw开发者_如何学Goeen the applicability of these modules.
DateTime:Format::XSD is just a subclass of DateTime:Format::ISO8601 so you've got an extra dependency there.
But DateTime::Format::RFC3339 will not preserve your timezone (it will convert the time to UTC instead) whereas the XSD module will preserve it.
精彩评论