Earlier quoted context omitted.
Funnily enough, I just got a bunch of one hour computer schedule changes for a European event in late March. I assume this is related to Daylight Savings vs. Standard Time. I'm sure I'll work it out once I'm over there.
The additional complication is that the US and Europe switch on different dates, so they’re “out of sync” one way or another.
The surprising whimsy of the Time Zone Database
71–73 of 73 posts
Re: The surprising whimsy of the Time Zone Database
#72Earlier quoted context omitted.
> You need it to encode or decode past dates to unix time or other time standards. Which you need to do if > You do not need it to "interpret" past dates. you want to interpret past dates. Mainly you need a historical record of the offsets. Or you're trading inaccuracy of duration measurement from one or two days out of the year to every day of the year by not keeping track of historical offsets or taking them into c…
> It can even work for future dates and times too! Morocco has some complex logic around Ramadan... which is a moveable festival. https://github.com/eggert/tz/blob/main/africa#L854 Rule Morocco 2026 only - Feb 15 3:00 -1:00 - Rule Morocco 2026 only - Mar 22 2:00 0 - Rule Morocco 2027 only - Feb 7 3:00 -1:00 - Rule Morocco 2027 only - Mar 14 2:00 0 - Rule Morocco 2028 only - Jan 23 3:00 -1:00 - Rule Morocco 2028 only…
Re: The surprising whimsy of the Time Zone Database
#73Earlier quoted context omitted.
> It can even work for future dates and times too! Morocco has some complex logic around Ramadan... which is a moveable festival. https://github.com/eggert/tz/blob/main/africa#L854 Rule Morocco 2026 only - Feb 15 3:00 -1:00 - Rule Morocco 2026 only - Mar 22 2:00 0 - Rule Morocco 2027 only - Feb 7 3:00 -1:00 - Rule Morocco 2027 only - Mar 14 2:00 0 - Rule Morocco 2028 only - Jan 23 3:00 -1:00 - Rule Morocco 2028 only…
Didn't know that it was moveable! It's actually a great example of why storing future datetimes in UTC is wrong. Future dates should always be stored in local time with appropriate zone information and then converted close to the "decision time". Otherwise, it may represent the wrong local time by the time the dated information is supposed to take effect!
That's part of the reason that Morocco does a time shift during Ramadan - moving sunrise an hour later in the day so that there is more time before dawn to have breakfast. It's daylight savings but for the purpose of more pre-dawn time than afternoon-sun time.
https://www.moroccoworldnews.com/2026/02/278108/morocco-to-r...
> Rabat – The Ministry of Digital Transition has announced that Morocco will suspend daylight saving time and return to GMT on Sunday, February 15 at 3 a.m for Ramadan 2026.
> Astronomical calculations expect Ramadan to begin on February 19 in Morocco. The Ministry of Islamic Affairs will confirm the official starting date after the sighting of the crescent moon.
> Morocco suspends daylight saving time exclusively for the holy month of Ramadan, as it affects the fasting time.
> The ministry emphasized that 60 minutes will be added to the official time at 2 a.m. on Sunday, March 22, following Ramadan.
> ...
> The North African country decided to adopt the daylight saving measure in 2008 during the summer season. The decision’s goal is to increase competitiveness of the national economy through reducing energy consumption and also the time difference between the country and its regional and international trading partners.
> Under the measure, Morocco switched the clock every summer to DST, GMT+1, and returned to the old standard time, GMT, for a period when Ramadan fell in the summer.
> In October 2018, however, the Moroccan government adopted Draft Decree 2.18.855, adding 60 minutes to the standard time in the country year-round.
> The decision stirred controversy and frustration, with Moroccans protesting the move. But it has since become a normal part of Morocco’s preparation for Ramadan.