-
Notifications
You must be signed in to change notification settings - Fork 833
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
isDST() of Africa/El_Aaiun returns incorrect value despite UTC offset difference #968
Comments
Africa/Casablanca shares the same issue, should be related to the WEST (Western European Summer Time) vs WET (Western European Time) |
This looks like a bug caused by the naïve way that the core Moment calculates the DST value. It compares offsets between dates in January and June (see moment/moment#3311 (comment)). But this fails to account for the countries that adjust their UTC offset for only a month or so, based on Ramadan. It should be possible to get Moment Timezone to override this calculation based on the data files, but I think this would still be buggy in the current format. The data files don't save all the raw values from the initial IANA time zone database source, just the calculated final offsets. This means some information is lost during compilation of the data files. This scenario is especially complicated for zones like |
It seems that |
That's right, Namibia ( |
I think alternative time and DST should be treated as different concepts. And it seems like the consensus is that DST is the time that's observably ahead. https://en.wikipedia.org/wiki/Daylight_saving_time#Procedure
|
@andyhokl other than documenting that |
Moment-timezone version which you use:
Version: 0.5.34
Note: many issues are resolved if you just upgrade to the latest version
Issue description:
UTC offset of Africa/El_Aaiun on 15 May 2021 returns 0 minutes
UTC offset of Africa/El_Aaiun on today (5 Jan 2022) returns 60 minutes
but both instances of moment return false for isDST()
The correct value should be:
15 May 2021 one return false
5 Jan 2022 one return true
The text was updated successfully, but these errors were encountered: