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

Formatting as ISO8601 should use a Z when in UTC mode #3020

Closed
mattjohnsonpint opened this issue Mar 8, 2016 · 2 comments
Closed

Formatting as ISO8601 should use a Z when in UTC mode #3020

mattjohnsonpint opened this issue Mar 8, 2016 · 2 comments

Comments

@mattjohnsonpint
Copy link
Contributor

Currently, a moment in UTC mode (such as moment.utc(), or moment().utc(), etc.) is formatted with a +00:00 offset when .format() is called with no parameters.

Example:
image

For best conformance to ISO8601/RFC3339, when the time zone is explicitly UTC then we should use Z instead of +00:00.

The difference is semantic only, though important in some contexts. For example, +00:00 might be from London in the winter, or from several places in Africa. But Z is always UTC.

@theotow
Copy link

theotow commented Mar 28, 2016

@mj1856 i would like to help, i have the enviroment up, can you give me another hint how to proceed, thanks

@maggiepint
Copy link
Member

Tracked by #3098

ichernev pushed a commit that referenced this issue Apr 16, 2016
As described in issue #3020, a moment in UTC mode
should be formatted, by default, with the letter Z
as a suffix instead of the time zone, +00:00.
ichernev added a commit that referenced this issue Apr 16, 2016
joelmukuthu pushed a commit to unexpectedjs/unexpected-moment that referenced this issue Jun 26, 2016
Ref: moment/moment#3020
This presents a breaking change for anyone who might have been
asserting against the error message thrown.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants