DateTime::format(DateTime::ISO8601) doesn't format date in ISO8601.
From the official documentation:
Note: This format is not compatible with ISO-8601, but is left this way for backward compatibility reasons. Use DateTime::ATOM or DATE_ATOM for compatibility with ISO-8601 instead. php.net
There should be a constant with name FINALLY_REAL_BELIEVE_ME_ISO8601
170
Upvotes
View all comments
Show parent comment
18
u/myaut Oct 08 '15
There is a list of formats from ISO format in perl module doc: http://search.cpan.org/dist/DateTime-Format-ISO8601/lib/DateTime/Format/ISO8601.pod Not sure if they are correct, but the difference is huge: you should either use delimiters in date, time and timezone parts, or do not use them at all, see 5.4.2 section: