marnusw / date-fns-tz

Complementary library for date-fns v2 adding IANA time zone support
MIT License
1.08k stars 116 forks source link

Incorrect timezone conversion to offset for Asia/Amman #208

Closed altick closed 2 years ago

altick commented 2 years ago

When converting the IANA timezone string into offset using the getTimezoneOffset function I receive incorrect offset for Asia/Amman. The function returns offset 120 minutes (UTC+2) when there should be actually 180 minutes offset (UTC+3).

The Jordan recently scraped the DST which might be the cause of it. Since this year they use UTC+3 permanently. However, I have also tried for earlier dates before that and it always returns 120 minutes.

Here is the repro: https://github.com/altick/date-fns-tz-offset-issue-repro

Thank you for your help.

altick commented 2 years ago

After further investigation this issue doesn't seem to be related to this library but to the underlying OS. Closing the issue.