Fixed timezone conversion with changing timezones

Authored by mollekopf on Apr 17 2023, 10:53 PM.



When timezone information changes it is important that we include the
timezone information current at the time when the event was created,
so it is displayed in the right place.

We used to always provide timezone information current at the time of
synchronization (respectively, we cached that information once and never
updated it). This resulted in recurring events that were created before
a timezone info change, to be displayed in the wrong time forever.

With this patch we:

  • take dtstart into account when generating the timezone information
  • drop the caching of timezone information as it would have to take the date range during which it is valid into account.

Diff Detail

rS syncroton
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mollekopf requested review of this revision.Apr 17 2023, 10:53 PM
mollekopf created this revision.
machniak accepted this revision.Apr 18 2023, 8:13 AM
machniak added a subscriber: machniak.

We should be fine without cache. I think it was invented for slower PHP5.

This revision is now accepted and ready to land.Apr 18 2023, 8:13 AM

I don't have any data, but I suspect generating the timezone information every time is relatively costly (looks like a lot of stuff is happening), so no caching at all might be problematic.
Caching the potentially changing information, and making sure we pick the right version of timezoneinformation without making caching useless (by caching each dtstart version) seems relatively involved.
Perhaps we can just not provide timezone information with non-recurring events though (outlook seems to do that when creating new events).

Just seen your comment, let's just try no cache then.

Closed by commit rS61d70ef4d76e: Fixed timezone conversion with changing timezones (authored by Christian Mollekopf <>). · Explain WhyApr 19 2023, 1:27 PM
This revision was automatically updated to reflect the committed changes.