Picture of Thomas Ackermann (innovaphone)
Moderator Registered 12 years 124 days
Thomas Ackermann (innovaphone) Tuesday, 7 June 2016, 05:17 PM in response to Thomas Ackermann (innovaphone)
Re: Change Summertime more than one time a year (Ramadan)
Here is the official "Time Zone Database" maintained by IANA: http://www.iana.org/time-zones
The only reliable way of turning UTC into local wall clock time is to import this rules on every firmware release and apply them.

For a dozen built-in Timezones:
"Europe - Central European Time (UTC+1)",
"Europe - East European Time (UTC+2)",
"Europe - West European Time (UTC)",
...

we have built-in POSIX timezone strings:
"CET-1CEST-2,M3.5.0/2,M10.5.0/3",
"EEST-2EEDT-3,M3.5.0/3,M10.5.0/4",
"GMT0BST-1,M3.5.0/1,M10.5.0/2",
....

Even this information is more ten years old (not regularly checked if still valid).
For all other localities we leave it up to the user to select "Other" and enter a proper POSIX timezone string.
But as we learned you cannot put Morocco time into a POSIX timezone string at all.
For 2 reasons:
  1. there are 4 switches between Normal time and DST (not only 2)
  2. the switch dates are not fixed (due to moving Ramadan)

The perfect solution would be moving away from the POSIX tz strings whith all their disadvantages (https://www.ibm.com/developerworks/aix/library/au-aix-posix/)
and applying the RULES from the IANA database instead.

But that's a big development project!

Workaround is:

  1. select "Other"
  2. construct a tz string for the first period of DST (march until beginning of Ramadan)
  3. if Ramadan has started: change tz string for the second period of DST (end of Ramadan until october)

/Thomas

← You can define your color theme preference here