You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ParseIso() function in the WebHelpers module doesn't seem to handle offsets correctly.
JSON ISO String with 0 offset: "2016-06-01T01:08:20.9333502+00:00"
Is not treated as being UTC and doesn't get the local timezone added to it... It simply gets shown as is.
JSON ISO String with 12 hour offset: "2016-06-01T13:08:20.9333502+12:00"
Gets its 12 hour offset added to it again which sets it 12 hours into the future...
Correct me if I'm wrong here but I believe that with ISO 8601 the offset specifies how far away the stated date/time is from UTC.
So to get the second example's JSON ISO String in your local time you would first subtract 12 hours to get it to a UTC time and then add your local timezone offset to get it in local time.
The text was updated successfully, but these errors were encountered:
The ParseIso() function in the WebHelpers module doesn't seem to handle offsets correctly.
JSON ISO String with 0 offset:
"2016-06-01T01:08:20.9333502+00:00"
Is not treated as being UTC and doesn't get the local timezone added to it... It simply gets shown as is.
JSON ISO String with 12 hour offset:
"2016-06-01T13:08:20.9333502+12:00"
Gets its 12 hour offset added to it again which sets it 12 hours into the future...
Correct me if I'm wrong here but I believe that with ISO 8601 the offset specifies how far away the stated date/time is from UTC.
So to get the second example's JSON ISO String in your local time you would first subtract 12 hours to get it to a UTC time and then add your local timezone offset to get it in local time.
The text was updated successfully, but these errors were encountered: