timezonedebianzoneinfotzdata

TZ Database on Debian Stable for Casablanca ignores the permanent change to DST and Adds an offset of 1


I am on a Debian Stable 9 (stretch), the newly updated TZ database for Africa/Casablanca Table currently states isdst=0 and an offset from UTC of +01. From the DST in Morocco Wiki page

https://en.wikipedia.org/wiki/Daylight_saving_time_in_Morocco

It is clear that a permanent offset of UTC +1:00 was added from October 2018 and daylight savings is now permanently observed.

But during Ramadan the offset has been traditionally reset to UTC 00:00. But the TZ database denotes that they add an offset of +01 and isdst is set to 1.

This issue is only applicable to Africa/Casablanca.

It seems to be an issue with Debian Stable. Any advice on fixing this issue is appreciated

zdump -v /usr/share/zoneinfo/Africa/Casablanca | grep 2019

/usr/share/zoneinfo/Africa/Casablanca Sun May 5 01:59:59 2019 UT = Sun May 5 02:59:59 2019 +01 isdst=0 gmtoff=3600

/usr/share/zoneinfo/Africa/Casablanca Sun May 5 02:00:00 2019 UT = Sun May 5 02:00:00 2019 +00 isdst=1 gmtoff=0

/usr/share/zoneinfo/Africa/Casablanca Sun Jun 9 01:59:59 2019 UT = Sun Jun 9 01:59:59 2019 +00 isdst=1 gmtoff=0

/usr/share/zoneinfo/Africa/Casablanca Sun Jun 9 02:00:00 2019 UT = Sun Jun 9 03:00:00 2019 +01 isdst=0 gmtoff=3600


Solution

  • From the tzdb 2018h release notes (emphasis mine):

    Changes to future timestamps

    Guess that Morocco will continue to fall back just before and spring forward just after Ramadan, the practice since 2012. (Thanks to Maamar Abdelkader.) This means Morocco will observe negative DST during Ramadan in main and vanguard formats, and in rearguard format it stays in the +00 timezone and observes ordinary DST in all months other than Ramadan. As before, extend this guesswork to the year 2037. As a consequence, Morocco is scheduled to observe three DST transitions in some Gregorian years (e.g., 2033) due to the mismatch between the Gregorian and Islamic calendars.

    It was later confirmed that Morocco did indeed adjust its clocks for Ramadan as predicted. You can read the tz discussion thread, or the article about it on timeanddate.com.

    Even the Wikipedia article you cited mentions this:

    ... An exception was made during the month of Ramadan during which clocks reverted to UTC+00:00 (standard time).