File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,10 @@ class TimeZoneUtil
1616{
1717 public static $ map = null ;
1818
19+ public static $ microsoftMap = [
20+ 'tzone://Microsoft/Utc ' => 'UTC ' ,
21+ ];
22+
1923 /**
2024 * List of microsoft exchange timezone ids.
2125 *
@@ -244,7 +248,8 @@ public static function loadTzMaps()
244248 include __DIR__ .'/timezonedata/lotuszones.php ' ,
245249 include __DIR__ .'/timezonedata/exchangezones.php ' ,
246250 include __DIR__ .'/timezonedata/php-workaround.php ' ,
247- include __DIR__ .'/timezonedata/extrazones.php '
251+ include __DIR__ .'/timezonedata/extrazones.php ' ,
252+ self ::$ microsoftMap
248253 );
249254 }
250255
Original file line number Diff line number Diff line change @@ -354,4 +354,11 @@ public function testPrefixedOffsetExchangeIdentifier()
354354 $ ex = new \DateTimeZone ('America/New_York ' );
355355 $ this ->assertEquals ($ ex ->getName (), $ tz ->getName ());
356356 }
357+
358+ public function testMicrosoftMap ()
359+ {
360+ $ tz = TimeZoneUtil::getTimeZone ('tzone://Microsoft/Utc ' , null , true );
361+ $ ex = new \DateTimeZone ('UTC ' );
362+ $ this ->assertEquals ($ ex ->getName (), $ tz ->getName ());
363+ }
357364}
You can’t perform that action at this time.
0 commit comments