-
Notifications
You must be signed in to change notification settings - Fork 114
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
Timezone offset unexpectedly different for date in 2038 between @js-joda/timezone 2.1.1 and 2.2.0 #374
Comments
Could you compare this with |
@pithu, Yes, I do see this same behavior with Here's my test script for moment-timezone:
With moment-timezone 0.5.25 (tzdata 2019a)
With moment-timezone 0.5.26 (tzdata 2019b)
|
After looking at this more, I'm not sure this should be the expected behavior with tzdata 2019b. Perhaps someone more knowledgeable on this could take a look. I'm reopening this for now. Furthermore, with Java 8u231 updated with the latest tzdata 2019c, I see that is has a different behavior than the latest js-joda and moment-timezone. It is behaving how the older versions of js-joda and moment-timezone behaved by calculating daylight saving time for 2038 the same as in 2037. Java 8u231 updated using TZUpdater with tzdata 2019c:
And this is the output:
|
Looks like an issue with tz data in moment-timezone, if i got you right. Can you report the problem there. @js-joda/timezone is simply using a copy of the moment-timezone data. |
Thank @pithu. I didn't realize the tz data comes from moment-timezone. I added a comment to an existing issue for this moment/moment-timezone#768. I'll go ahead and close this again. |
I'm noticing the timezone offset in @js-joda/timezone 2.2.0 is unexpectedly different as compared to 2.1.1. I am testing this with America/Chicago time zone for 2038-09-08. For 2038-09-08 with 2.1.1 is is returning offset of -5 hours. But with 2.2.0, it is unexpectedly returning an offset of -6 hours. Although it works fine for the year before of 2037-09-08. I don't see anything in tzdata 2019c that would account for this.
TypeScript Test case:
In both cases, using @js-joda/core@2.0.0.
@js-joda/timezone 2.1.1:
@js-joda/timezone 2.2.0:
Is this expected for 2037-09-08 to be offset -5 hours and 2038-09-08 to be offset -6 hours? In both cases it should be on daylight saving time, as far as I know.
The text was updated successfully, but these errors were encountered: