aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/vobject/lib/TimeZoneUtil.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-03-15 17:44:21 -0700
committerzotlabs <mike@macgirvin.com>2017-03-15 17:44:21 -0700
commitb20062efa6052e29b8d2d2a42ca966837db1c29f (patch)
treeb3d1dd541319e2abb2af6ec62f2fa3003a9e3941 /vendor/sabre/vobject/lib/TimeZoneUtil.php
parent14f16a7ef0ce1412fcccdabf6a44dd83efee9c60 (diff)
parent8d4744d115036dd7ec4169f8b1fdebebac6fb602 (diff)
downloadvolse-hubzilla-b20062efa6052e29b8d2d2a42ca966837db1c29f.tar.gz
volse-hubzilla-b20062efa6052e29b8d2d2a42ca966837db1c29f.tar.bz2
volse-hubzilla-b20062efa6052e29b8d2d2a42ca966837db1c29f.zip
Merge branch 'red' of https://github.com/zotlabs/hubzilla into red
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)) {