From ea1997128529965fa92f1a182c2a7ad02b88d3e3 Mon Sep 17 00:00:00 2001 From: Klaus Weidenbach Date: Wed, 31 May 2017 23:12:55 +0200 Subject: :arrow_up:Update Sabre libraries. --- vendor/sabre/vobject/lib/TimeZoneUtil.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'vendor/sabre/vobject/lib/TimeZoneUtil.php') diff --git a/vendor/sabre/vobject/lib/TimeZoneUtil.php b/vendor/sabre/vobject/lib/TimeZoneUtil.php index 2a95ae898..925183e8d 100644 --- a/vendor/sabre/vobject/lib/TimeZoneUtil.php +++ b/vendor/sabre/vobject/lib/TimeZoneUtil.php @@ -165,6 +165,16 @@ class TimeZoneUtil { return new \DateTimeZone(self::$map[$tzid]); } + // Some Microsoft products prefix the offset first, so let's strip that off + // and see if it is our tzid map. We don't want to check for this first just + // in case there are overrides in our tzid map. + if (preg_match('/^\((UTC|GMT)(\+|\-)[\d]{2}\:[\d]{2}\) (.*)/', $tzid, $matches)) { + $tzidAlternate = $matches[3]; + if (isset(self::$map[$tzidAlternate])) { + return new \DateTimeZone(self::$map[$tzidAlternate]); + } + } + // Maybe the author was hyper-lazy and just included an offset. We // support it, but we aren't happy about it. if (preg_match('/^GMT(\+|-)([0-9]{4})$/', $tzid, $matches)) { -- cgit v1.2.3