From 71d41dc3d2aa959ed9f291f55f046a6a7960ee8f Mon Sep 17 00:00:00 2001 From: jtt Date: Mon, 2 Feb 2026 09:58:44 +0000 Subject: [PATCH] productivity/baikal: add timezone workaround for recurrence expansion As explained in [0], when creating a calendar via the web interface, Baikal sets cal:calendar-timezone to a timezone string instead of a VTIMEZONE object. This causes an issue when querying events with expanded recurrences, see [1]. To work around this, create a new DateTimeZone object from the string. [0] https://github.com/sabre-io/Baikal/issues/1241 [1] https://github.com/sabre-io/Baikal/issues/1325 --- productivity/baikal/Makefile | 1 + ...tch-vendor_sabre_dav_lib_CalDAV_Plugin_php | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 productivity/baikal/patches/patch-vendor_sabre_dav_lib_CalDAV_Plugin_php diff --git a/productivity/baikal/Makefile b/productivity/baikal/Makefile index 56e82eee0ea..a13c1ae5b18 100644 --- a/productivity/baikal/Makefile +++ b/productivity/baikal/Makefile @@ -2,6 +2,7 @@ COMMENT= lightweight CalDAV and CardDAV server VERSION= 0.11.1 DISTNAME= baikal-${VERSION} +REVISION= 0 SITES= https://github.com/sabre-io/Baikal/releases/download/${VERSION}/ DISTFILES= ${DISTNAME}.zip CATEGORIES= productivity www diff --git a/productivity/baikal/patches/patch-vendor_sabre_dav_lib_CalDAV_Plugin_php b/productivity/baikal/patches/patch-vendor_sabre_dav_lib_CalDAV_Plugin_php new file mode 100644 index 00000000000..5f307335fbd --- /dev/null +++ b/productivity/baikal/patches/patch-vendor_sabre_dav_lib_CalDAV_Plugin_php @@ -0,0 +1,22 @@ +https://github.com/sabre-io/Baikal/issues/1241 +https://github.com/sabre-io/Baikal/issues/1325 + +Index: vendor/sabre/dav/lib/CalDAV/Plugin.php +--- vendor/sabre/dav/lib/CalDAV/Plugin.php.orig ++++ vendor/sabre/dav/lib/CalDAV/Plugin.php +@@ -508,14 +508,7 @@ class Plugin extends DAV\ServerPlugin + $tzProp = '{'.self::NS_CALDAV.'}calendar-timezone'; + $tzResult = $this->server->getProperties($path, [$tzProp]); + if (isset($tzResult[$tzProp])) { +- // This property contains a VCALENDAR with a single +- // VTIMEZONE. +- $vtimezoneObj = VObject\Reader::read($tzResult[$tzProp]); +- $calendarTimeZone = $vtimezoneObj->VTIMEZONE->getTimeZone(); +- +- // Destroy circular references so PHP will garbage collect the +- // object. +- $vtimezoneObj->destroy(); ++ $calendarTimeZone = new DateTimeZone($tzResult[$tzProp]); + } else { + // Defaulting to UTC. + $calendarTimeZone = new DateTimeZone('UTC');