This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Timezone offset bug #1261
Labels
Comments
@benpriebe Seems like a bug to me too. Looking at http://www.w3.org/TR/NOTE-datetime it states:
|
latentflip
added a commit
to latentflip/angular.js
that referenced
this issue
Jan 30, 2013
This commit fixes angular#1261 and angular#1532. This covers two separate issues: - Positive timezones were being formatted without a leading `+` resulting in a formatting string like: "HH:MM:ssZ" giving "12:13:141000" instead of "12:13:14+1000". Fixed by checking if timezone is > 0 and adding a leading "+". - Timezone output signs were inverted. mock.TzDate expects the timezone _offset_ as it's first argument, _not_ the timezone. This means that a mock.TzDate with a positive offset should result in a date string with a negative timezone, and vice-versa.
latentflip
added a commit
to latentflip/angular.js
that referenced
this issue
Jan 30, 2013
This commit fixes angular#1261 and angular#1532. This covers two separate issues: - Positive timezones were being formatted without a leading `+` resulting in a formatting string like: "HH:MM:ssZ" giving "12:13:141000" instead of "12:13:14+1000". Fixed by checking if timezone is > 0 and adding a leading "+". - Timezone output signs were inverted. mock.TzDate expects the timezone _offset_ as it's first argument, _not_ the timezone. This means that a mock.TzDate with a positive offset should result in a date string with a negative timezone, and vice-versa.
latentflip
added a commit
to latentflip/angular.js
that referenced
this issue
Feb 3, 2013
This commit fixes angular#1261 and angular#1532. This covers two separate issues: - Positive timezones were being formatted without a leading `+` resulting in a formatting string like: "HH:MM:ssZ" giving "12:13:141000" instead of "12:13:14+1000". Fixed by checking if timezone is > 0 and adding a leading "+". - Timezone output signs were inverted. mock.TzDate expects the timezone _offset_ as it's first argument, _not_ the timezone. This means that a mock.TzDate with a positive offset should result in a date string with a negative timezone, and vice-versa.
IgorMinar
pushed a commit
to IgorMinar/angular.js
that referenced
this issue
Feb 7, 2013
This commit fixes angular#1261 and angular#1532. This covers two separate issues: - Positive timezones were being formatted without a leading `+` resulting in a formatting string like: "HH:MM:ssZ" giving "12:13:141000" instead of "12:13:14+1000". Fixed by checking if timezone is > 0 and adding a leading "+". - Timezone output signs were inverted. mock.TzDate expects the timezone _offset_ as it's first argument, _not_ the timezone. This means that a mock.TzDate with a positive offset should result in a date string with a negative timezone, and vice-versa. Closes angular#1261, angular#1532
IgorMinar
pushed a commit
that referenced
this issue
Feb 7, 2013
This commit fixes #1261 and #1532. This covers two separate issues: - Positive timezones were being formatted without a leading `+` resulting in a formatting string like: "HH:MM:ssZ" giving "12:13:141000" instead of "12:13:14+1000". Fixed by checking if timezone is > 0 and adding a leading "+". - Timezone output signs were inverted. mock.TzDate expects the timezone _offset_ as it's first argument, _not_ the timezone. This means that a mock.TzDate with a positive offset should result in a date string with a negative timezone, and vice-versa. Closes #1261, #1532
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When I hit my site from a +1000 timezone and run the date through a $filter with the Z timezone formatter I get a -1000 timezone.
e.g.
Which equals:
I would expect it to equal:
If my understanding is not flawed, then this is the method that has the bug.
around line: 9805 (angular.js 1.0.1)
The text was updated successfully, but these errors were encountered: