[tz] Java & Rearguard

Paul Eggert eggert at cs.ucla.edu
Tue Jun 11 21:45:31 UTC 2019


On 6/11/19 1:14 PM, Guy Harris wrote:
> Are there any countries that do both seasonal adjustment *and* Ramadan 
> adjustment *in the same year*?


Morocco did that from 2013 through October 2018. That is, they sprang 
forward on March's last Sunday and fell back on October's last Sunday; 
and they also fell back before Ramadan and sprang forward afterward, so 
that there were four transitions per year. Egypt did something similar 
in 2010 and in 2014, as did Palestine's West Bank in 2011.

tzdb can specify this succinctly, as any number of rules can apply 
during a year. CLDR+Java can handle this situation too (I don't know 
how, but I just now checked Morocco in 2017 and it worked OK). POSIX TZ 
strings cannot handle it, though, as POSIX provides for only two 
transitions per year.

It's a bit of a mess to do it, partly because the Islamic calendar is 
astronomical and not algorithmic, and quite possibly we won't see 
anything similar in the near future with DST transitions falling out of 
favor in Europe anyway.




More information about the tz mailing list