plugins/calendar

Thomas Brüderli bruederli at kolabsys.com
Wed Jan 23 10:07:30 CET 2013


 plugins/calendar/lib/calendar_ical.php |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 1f9f09fe09499a02fb1fb26fbf4c8e8bc71aeb2d
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date:   Wed Jan 23 10:06:44 2013 +0100

    Fix ical export with (invalid) timezone +00:00

diff --git a/plugins/calendar/lib/calendar_ical.php b/plugins/calendar/lib/calendar_ical.php
index f77224d..cec2040 100644
--- a/plugins/calendar/lib/calendar_ical.php
+++ b/plugins/calendar/lib/calendar_ical.php
@@ -449,7 +449,8 @@ class calendar_ical
     else {
       // <ATTR>;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'));
     }
   }





More information about the commits mailing list