From 621363820dbb294016c0ed9fbc9776c2a984e81a Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 23 Feb 2017 11:32:22 +0000 Subject: [PATCH] replace calendar_zpush::tz2as with TimezoneUtil::GetFullTZFromTZName call, as it seems to produce more accurate results --- calendar/inc/class.calendar_zpush.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/calendar/inc/class.calendar_zpush.inc.php b/calendar/inc/class.calendar_zpush.inc.php index 029d7e8006..89ef8cd7fd 100644 --- a/calendar/inc/class.calendar_zpush.inc.php +++ b/calendar/inc/class.calendar_zpush.inc.php @@ -353,7 +353,9 @@ class calendar_zpush implements activesync_plugin_write, activesync_plugin_meeti $message = new SyncMeetingRequest(); // set timezone try { - $as_tz = self::tz2as($event['tzid']); + //$as_tz = self::tz2as($event['tzid']); + // Using TimezoneUtil from zpush to transform from name to as_tz array + $as_tz = TimezoneUtil::GetFullTZFromTZName($event['tzid']); $message->timezone = base64_encode(self::_getSyncBlobFromTZ($as_tz)); } catch(Exception $e) { @@ -1712,7 +1714,9 @@ if (isset($_SERVER['SCRIPT_FILENAME']) && $_SERVER['SCRIPT_FILENAME'] == __FILE_ $ical_tz = $ical; $ical_arr = calendar_zpush::ical2array($ical_tz); //echo "
".print_r($ical_arr,true)."
\n"; - $as_tz = calendar_zpush::tz2as($tz); + //$as_tz = calendar_zpush::tz2as($tz); + // Using TimezoneUtil from zpush to transform from name to as_tz array + $as_tz = TimezoneUtil::GetFullTZFromTZName($event['tzid']); //echo "$tz=
".print_r($as_tz,true)."
\n"; $as_tz_org = calendar_zpush::_getTZFromSyncBlob(base64_decode($sync_blob));