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

Issues parsing ISO date strings with offsets #233

Closed
levitatejay opened this issue Jun 1, 2016 · 1 comment
Closed

Issues parsing ISO date strings with offsets #233

levitatejay opened this issue Jun 1, 2016 · 1 comment

Comments

@levitatejay
Copy link

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.

@timhall
Copy link
Member

timhall commented Jun 6, 2016

Hi @levitatejay thanks for raising this issue, I'll look into it. (tracked in VBA-tools/VBA-UTC#3)

@timhall timhall closed this as completed in 400728c Jun 6, 2016
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

2 participants