开发者

Which DateTime module is best for manipulating an XML date and time

开发者 https://www.devze.com 2023-01-02 16:33 出处:网络
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

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

精彩评论

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

关注公众号