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

Default date transform does not conform to ISO 8601 standard for dates with timezones #4764

Closed
tomlagier opened this issue Jan 24, 2017 · 2 comments

Comments

@tomlagier
Copy link
Contributor

tomlagier commented Jan 24, 2017

This is the default date transform: https://github.com/emberjs/data/blob/master/addon/-private/ext/date.js#L34

Per https://www.w3.org/TR/NOTE-datetime, timezones should be specified as TZD = time zone designator (Z or +hh:mm or -hh:mm)

The regex on the above line only parses Z or +hhmm or -hhmm - note the missing : after the last non-capture group ((?:(\d{2}...).

Looks like a simple mistake, but it breaks out of the box normalization of dates on servers with timezones. Let me know if you would like a PR to fix or if there is some context here that I'm missing. In the meantime, we can create our own normalize function to properly create dates out of those strings.

@bmac
Copy link
Member

bmac commented Jan 25, 2017

Hi @tomlagier. We would accept a pr to fix the issue if you have the time.

@bmac
Copy link
Member

bmac commented Jan 26, 2017

Closed via #4771

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

4 participants