From 1f9f09fe09499a02fb1fb26fbf4c8e8bc71aeb2d Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 23 Jan 2013 10:06:44 +0100 Subject: [PATCH] Fix ical export with (invalid) timezone +00:00 --- plugins/calendar/lib/calendar_ical.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/calendar/lib/calendar_ical.php b/plugins/calendar/lib/calendar_ical.php index f77224dc..cec20400 100644 --- a/plugins/calendar/lib/calendar_ical.php +++ b/plugins/calendar/lib/calendar_ical.php @@ -449,7 +449,8 @@ class calendar_ical else { // ;TZID=Europe/Zurich:20120706T210000 $tz = $dt->getTimezone(); - $tzid = $tz && $tz->getName() != 'UTC' ? ';TZID=' . $tz->getName() : ''; + $tzname = $tz ? $tz->getName() : null; + $tzid = $tzname && $tzname != 'UTC' && $tzname != '+00:00' ? ';TZID=' . $tzname : ''; return $attr . $tzid . ':' . $dt->format('Ymd\THis' . ($tzid ? '' : '\Z')); } }