From f181e2c6ff7fb55c061d66e3d0c87952e3f38d54 Mon Sep 17 00:00:00 2001 From: Tobias Wirth <101554234+twirth5@users.noreply.github.com> Date: Wed, 6 Apr 2022 10:32:08 +0200 Subject: [PATCH] Fixed missing offset from daylight savings time When the humhub calender is imported into outlook for windows, all entries that are defined after the 27th of march (change from standard time to daylight savings time) are off by +1 hour. Our quick fix was, to hard code the timezone into the withEvents() method of VCalendar, so that the correct header is added to the exported ics. --- integration/calendar/CalendarExportService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration/calendar/CalendarExportService.php b/integration/calendar/CalendarExportService.php index 8138793..d360d98 100644 --- a/integration/calendar/CalendarExportService.php +++ b/integration/calendar/CalendarExportService.php @@ -52,11 +52,11 @@ public function createIcsByExportToken($token, $from = null, $to = null) $items[] = $this->calendarService->getCalendarItems($from, $to, $export->getFilterArray(), $container, null, false); } - $cal = VCalendar::withEvents(array_merge(...$items)); + $cal = VCalendar::withEvents(array_merge(...$items), "Europe/Berlin")); return $cal->serialize(); } finally { Yii::$app->user->setIdentity(null); } } -} \ No newline at end of file +}