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

given iso offset is coerced by dst-offset #103

Closed
davyuu opened this issue Feb 22, 2019 · 11 comments
Closed

given iso offset is coerced by dst-offset #103

davyuu opened this issue Feb 22, 2019 · 11 comments

Comments

@davyuu
Copy link

davyuu commented Feb 22, 2019

image 1

Hey, bumped into another issue with parsing ISO timestamps. In this case, I am trying to parse 2019-03-13T18:00:00.000-05:00 which is in CST or GMT-6 during DST which is in UTC-5. From the screenshot, I am just parsing the ISO timestamp and outputting it in ISO format and it is converting the offset to -4:00 while keeping the time the same.

I would really appreciate it if this and Issue 101 could be pushed into a release build. Thanks!

@hunteva
Copy link
Contributor

hunteva commented Feb 23, 2019

image

Could not reproduce this with version 5.2.1, can you please confirm what was your local tz and the version?
Cheers

@davyuu
Copy link
Author

davyuu commented Feb 23, 2019

image

I was able to recreate this on my other machine using the latest version 5.2.2.
My local tz is Toronto EST. It might be related to the fact that the parsed tz and my local tz are both in DST during that timestamp.

@hunteva
Copy link
Contributor

hunteva commented Feb 25, 2019

Found the cause, fixed in #105

spencermountain added a commit that referenced this issue Feb 25, 2019
Fix parseOffset bug documented as #103
@davyuu
Copy link
Author

davyuu commented Feb 26, 2019

@hunteva @spencermountain Thanks for fixing the issue! Sorry to bother, but is it possible to push a version with this fix?

@spencermountain
Copy link
Owner

i think this made it into 5.3.0

@spencermountain
Copy link
Owner

oops, no it didn't.
i've got something dirty on dev right now, will take a look at it in the next day or two

@spencermountain spencermountain changed the title Parsing ISO timestamps that are in DST release 5.4.0 Feb 26, 2019
@davyuu
Copy link
Author

davyuu commented Feb 27, 2019

@spencermountain Thanks!

@spencermountain spencermountain mentioned this issue Feb 28, 2019
Merged
@spencermountain
Copy link
Owner

published 5.4.0,
thanks for your help!

@spencermountain
Copy link
Owner

hey, i've re-introduced this issue, how fun!
at least, it will trigger if you set your system clock before dst.
will take a look at it this week
:/

spencermountain added a commit that referenced this issue Apr 6, 2019
jecraig pushed a commit to jecraig/spacetime that referenced this issue Apr 7, 2019
jecraig pushed a commit to jecraig/spacetime that referenced this issue Apr 7, 2019
@spencermountain
Copy link
Owner

// bug 1: set clock before march
let a = spacetime('2019-03-13T18:00:00.000-05:00')
console.log(a.format('iso'))
// 2019-03-13T18:00:00.000-04:00

@spencermountain spencermountain changed the title release 5.4.0 iso offset gets coerced by dst Apr 12, 2019
@spencermountain spencermountain changed the title iso offset gets coerced by dst given iso offset is coerced by dst-offset Apr 12, 2019
@spencermountain
Copy link
Owner

closed again, in 5.7.0
thanks

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