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

ISO 8601: Missing colon in timezone #44

Closed
dereuromark opened this issue Oct 28, 2015 · 6 comments
Closed

ISO 8601: Missing colon in timezone #44

dereuromark opened this issue Oct 28, 2015 · 6 comments
Assignees
Labels

Comments

@dereuromark
Copy link
Member

Shouldn't the toIso8601String() method have an colon between the hours and minutes in the timezone part?
1975-12-25T14:15:16-0500 becomes 1975-12-25T14:15:16-05:00

Spec: http://www.w3.org/TR/NOTE-datetime

Refs briannesbitt/Carbon#451

@markstory
Copy link
Member

We're using the PHP constant The chances of that being wrong seem pretty low.

@dereuromark
Copy link
Member Author

There is a note below that linked 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.

What an irony for a constant called DateTime::ISO8601 :trollface:

@dereuromark
Copy link
Member Author

So either we fix it ourselves (add the colon) or should promote using the outlined formats.

@ADmad
Copy link
Member

ADmad commented Oct 28, 2015

This format is not compatible with ISO-8601, but is left this way for backward compatibility reasons.

Heh, so someone made a mistake initially and instead of fixing it they decided to stick with it. PHP is full of funnies.

@markstory
Copy link
Member

Bloody Hell. Well, we can use ATOM instead of ISO8601

@markstory markstory self-assigned this Oct 29, 2015
markstory added a commit that referenced this issue Oct 29, 2015
PHP's internal constant is *wrong*. Thankfully the ATOM format is
*actually* ISO-8601 compliant.

Refs #44
@markstory
Copy link
Member

Pull request up.

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

No branches or pull requests

3 participants