ropg / ezTime

ezTime — pronounced "Easy Time" — is a very easy to use Arduino time and date library that provides NTP network time lookups, extensive timezone support, formatted time and date strings, user events, millisecond precision and more.
MIT License
327 stars 92 forks source link

Results from timezoned.rop.nl:2342 #17

Closed kthoene closed 5 years ago

kthoene commented 5 years ago

Hello, maybe this is not a bug, but I want to understand this.

For "Africa/Casablanca" your answer is: "OK Africa/Casablanca WET0WEST,M3.5.0,M10.5.0/3"

zdump -v Africa/Casablanca (for 2018) results to:

Africa/Casablanca Sun Mar 25 01:59:59 2018 UT = Sun Mar 25 01:59:59 2018 +00 isdst=0 gmtoff=0 Africa/Casablanca Sun Mar 25 02:00:00 2018 UT = Sun Mar 25 03:00:00 2018 +01 isdst=1 gmtoff=3600 Africa/Casablanca Sun May 13 01:59:59 2018 UT = Sun May 13 02:59:59 2018 +01 isdst=1 gmtoff=3600 Africa/Casablanca Sun May 13 02:00:00 2018 UT = Sun May 13 02:00:00 2018 +00 isdst=0 gmtoff=0 Africa/Casablanca Sun Jun 17 01:59:59 2018 UT = Sun Jun 17 01:59:59 2018 +00 isdst=0 gmtoff=0 Africa/Casablanca Sun Jun 17 02:00:00 2018 UT = Sun Jun 17 03:00:00 2018 +01 isdst=1 gmtoff=3600 Africa/Casablanca Fri Oct 26 22:59:59 2018 UT = Fri Oct 26 23:59:59 2018 +01 isdst=1 gmtoff=3600 Africa/Casablanca Fri Oct 26 23:00:00 2018 UT = Sat Oct 27 00:00:00 2018 +01 isdst=0 gmtoff=3600 0

I think POSIX TZ should be: GMT0GMT-1,M3.5.0/02:00:00,M5.3.0/03:00:00,M6.4.0/02:00:00,M10.4.6/00:00:00

Please enlighten me. / Greetings Kai.

ropg commented 5 years ago

From the ezTime User Manual:

Morocco

Morocco goes on and off Daylight Saving Time twice per year. This currently breaks ezTime as our parser can only handle one DST period per year. Fortunately they will stop doing this in 2020: the Moroccans probably got tired of all the clocks that did not adjust properly.

So sorry, but the idea that there are max. two transitions per year is somewhat central to my code, and really true everywhere but in Morocco.

And it seems like Rabat made a sudden change to having no transitions at all anymore recently, which surprised everyone.