Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateTime::ISO8601 isn't ISO8601 compatible #66

Closed
zoul0813 opened this issue Jul 17, 2017 · 0 comments
Closed

DateTime::ISO8601 isn't ISO8601 compatible #66

zoul0813 opened this issue Jul 17, 2017 · 0 comments

Comments

@zoul0813
Copy link
Contributor

Just discovered that DateTime::ISO8601 isn't compatible with the ISO8601 standard, PHP Docs state that you should use DateTime::ATOM to be compatible.

DateTime::ATOM
DATE_ATOM
Atom (example: 2005-08-15T15:52:01+00:00)

DateTime::ISO8601
DATE_ISO8601
ISO-8601 (example: 2005-08-15T15:52:01+0000)
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.

http://www.php.net/manual/en/class.datetime.php

The difference appears to be in how the TZ Offset at the end is formatted (0000 vs 00:00).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant