Skip Menu |

This queue is for tickets about the MooseX-Types-ISO8601 CPAN distribution.

Report information
The Basics
Id: 78753
Status: resolved
Priority: 0/
Queue: MooseX-Types-ISO8601

People
Owner: Nobody in particular
Requestors: ether [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.11
Fixed in: (no value)



Subject: ISO8601DateTimeStr doesn't validate strings created by DateTime itself
Consider: $ perl -MDateTime -MMooseX::Types::ISO8601=ISO8601DateTimeStr -wle'print DateTime->now->iso8601; print ISO8601DateTimeStr->check(DateTime->now->iso8601) ? "pass" : "fail"' 2012-08-02T23:50:37 fail According to my reading of http://en.wikipedia.org/wiki/ISO_8601, the trailing Z is not a required part of the combined datetime string. It is, however, preferred, so it would be reasonable for $dt->iso8601 to include the trailing Z when time_zone eq 'UTC'. If I don't hear any objections, I will change the appropriate regexp(s) to treat the Z as optional, as well as push a change up into the DateTime repository.
+1 Thanks in advance!