Page MenuHomePhorge

Fixed timezone conversion with changing timezones
ClosedPublic

Authored by mollekopf on Apr 17 2023, 10:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 10:32 AM
Unknown Object (File)
Wed, Apr 17, 10:32 AM
Unknown Object (File)
Wed, Apr 17, 10:32 AM
Unknown Object (File)
Mon, Apr 15, 3:59 AM
Unknown Object (File)
Fri, Apr 12, 9:39 AM
Unknown Object (File)
Fri, Apr 5, 9:06 AM
Unknown Object (File)
Fri, Apr 5, 1:53 AM
Unknown Object (File)
Wed, Apr 3, 1:15 PM
Subscribers

Details

Summary

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

Repository
rS syncroton
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mollekopf created this revision.
machniak subscribed.

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.

This revision was automatically updated to reflect the committed changes.