26 31 =>
'Africa/Casablanca',
36 69 =>
'Africa/Luanda',
38 5 =>
'Europe/Bucharest',
40 50 =>
'Africa/Harare',
41 59 =>
'Europe/Helsinki',
42 27 =>
'Asia/Jerusalem',
45 51 =>
'Europe/Moscow',
46 56 =>
'Africa/Nairobi',
51 58 =>
'Asia/Yekaterinburg',
53 23 =>
'Asia/Calcutta',
54 62 =>
'Asia/Kathmandu',
60 64 =>
'Asia/Krasnoyarsk',
61 45 =>
'Asia/Shanghai',
63 21 =>
'Asia/Singapore',
64 73 =>
'Australia/Perth',
69 19 =>
'Australia/Adelaide',
70 44 =>
'Australia/Darwin',
71 18 =>
'Australia/Brisbane',
72 76 =>
'Australia/Sydney',
74 42 =>
'Australia/Hobart',
75 68 =>
'Asia/Vladivostok',
77 17 =>
'Pacific/Auckland',
79 67 =>
'Pacific/Tongatapu',
80 29 =>
'Atlantic/Azores',
81 53 =>
'Atlantic/Cape_Verde',
82 30 =>
'America/Noronha',
83 8 =>
'America/Sao_Paulo',
84 32 =>
'America/Argentina/Buenos_Aires',
85 60 =>
'America/Godthab',
86 28 =>
'America/St_Johns',
87 9 =>
'America/Halifax',
88 33 =>
'America/Caracas',
89 65 =>
'America/Santiago',
90 35 =>
'America/Bogota',
91 10 =>
'America/New_York',
92 34 =>
'America/Indiana/Indianapolis',
93 55 =>
'America/Guatemala',
94 11 =>
'America/Chicago',
95 37 =>
'America/Mexico_City',
96 36 =>
'America/Edmonton',
97 38 =>
'America/Phoenix',
98 12 =>
'America/Denver',
99 13 =>
'America/Los_Angeles',
100 14 =>
'America/Anchorage',
101 15 =>
'Pacific/Honolulu',
102 16 =>
'Pacific/Midway',
103 39 =>
'Pacific/Kwajalein',
138 if ($tzid[0] !==
'(') {
146 $tzIdentifiers = \DateTimeZone::listIdentifiers();
150 (in_array($tzid, $tzIdentifiers)) ||
151 (preg_match(
'/^GMT(\+|-)([0-9]{4})$/', $tzid, $matches)) ||
152 (in_array($tzid, self::getIdentifiersBC()))
154 return new \DateTimeZone($tzid);
171 if (preg_match(
'/^\((UTC|GMT)(\+|\-)[\d]{2}\:[\d]{2}\) (.*)/', $tzid, $matches)) {
172 $tzidAlternate = $matches[3];
174 return new \DateTimeZone(
self::$map[$tzidAlternate]);
180 if (preg_match(
'/^GMT(\+|-)([0-9]{4})$/', $tzid, $matches)) {
188 return new \DateTimeZone(
'Etc/GMT' . $matches[1] . ltrim(substr($matches[2], 0, 2),
'0'));
195 foreach ($vcalendar->select(
'VTIMEZONE') as $vtimezone) {
197 if ((
string)$vtimezone->TZID === $tzid) {
200 if (isset($vtimezone->{
'X-LIC-LOCATION'})) {
202 $lic = (string)$vtimezone->{
'X-LIC-LOCATION'};
207 if (substr($lic, 0, 8) ===
'SystemV/') {
208 $lic = substr($lic, 8);
211 return self::getTimeZone($lic, null, $failIfUncertain);
216 if (isset($vtimezone->{
'X-MICROSOFT-CDO-TZID'})) {
217 $cdoId = (int)$vtimezone->{
'X-MICROSOFT-CDO-TZID'}->getValue();
220 if ($cdoId === 2 && strpos((
string)$vtimezone->TZID,
'Sarajevo') !==
false) {
221 return new \DateTimeZone(
'Europe/Sarajevo');
224 if (isset(self::$microsoftExchangeMap[$cdoId])) {
225 return new \DateTimeZone(self::$microsoftExchangeMap[$cdoId]);
235 if ($failIfUncertain) {
236 throw new \InvalidArgumentException(
'We were unable to determine the correct PHP timezone for tzid: ' . $tzid);
240 return new \DateTimeZone(date_default_timezone_get());
253 include __DIR__ .
'/timezonedata/windowszones.php',
254 include __DIR__ .
'/timezonedata/lotuszones.php',
255 include __DIR__ .
'/timezonedata/exchangezones.php',
256 include __DIR__ .
'/timezonedata/php-workaround.php' 273 return include __DIR__ .
'/timezonedata/php-bc.php';
static getIdentifiersBC()
This method returns an array of timezone identifiers, that are supported by DateTimeZone(), but not returned by DateTimeZone::listIdentifiers().
static static getTimeZone($tzid, Component $vcalendar=null, $failIfUncertain=false)
This method will try to find out the correct timezone for an iCalendar date-time value.
static loadTzMaps()
This method will load in all the tz mapping information, if it's not yet done.
Time zone name translation.
static $microsoftExchangeMap
List of microsoft exchange timezone ids.