aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/vobject/lib/TimeZoneUtil.php
diff options
context:
space:
mode:
authorgit-marijus <mario@mariovavti.com>2017-06-01 08:16:55 +0200
committerGitHub <noreply@github.com>2017-06-01 08:16:55 +0200
commit2e54024b92b8d1a86771c20831495d498f96d690 (patch)
treea96be42ef1e00f370bfba8ddf138917b8e0aa581 /vendor/sabre/vobject/lib/TimeZoneUtil.php
parent14229d0dd3205ea1e85d2c26d6c79bd68d19eda3 (diff)
parentea1997128529965fa92f1a182c2a7ad02b88d3e3 (diff)
downloadvolse-hubzilla-2e54024b92b8d1a86771c20831495d498f96d690.tar.gz
volse-hubzilla-2e54024b92b8d1a86771c20831495d498f96d690.tar.bz2
volse-hubzilla-2e54024b92b8d1a86771c20831495d498f96d690.zip
Merge pull request #804 from dawnbreak/dev
:arrow_up:Update Sabre libraries.
Diffstat (limited to 'vendor/sabre/vobject/lib/TimeZoneUtil.php')
-rw-r--r--vendor/sabre/vobject/lib/TimeZoneUtil.php10
1 files changed, 10 insertions, 0 deletions
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)) {