开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜