Changeset View
Changeset View
Standalone View
Standalone View
src/parser/calendar/ics/PhutilICSParser.php
Show First 20 Lines • Show All 843 Lines • ▼ Show 20 Lines | private function guessTimezone($tzid) { | ||||
static $aliases; | static $aliases; | ||||
if ($aliases === null) { | if ($aliases === null) { | ||||
$aliases = array( | $aliases = array( | ||||
'Etc/GMT' => 'UTC', | 'Etc/GMT' => 'UTC', | ||||
); | ); | ||||
// Load the map of Windows timezones. | // Load the map of Windows timezones. | ||||
$root_path = dirname(phutil_get_library_root('phutil')); | $root_path = dirname(phutil_get_library_root('arcanist')); | ||||
$windows_path = $root_path.'/resources/timezones/windows_timezones.json'; | $windows_path = $root_path.'/resources/timezones/windows_timezones.json'; | ||||
$windows_data = Filesystem::readFile($windows_path); | $windows_data = Filesystem::readFile($windows_path); | ||||
$windows_zones = phutil_json_decode($windows_data); | $windows_zones = phutil_json_decode($windows_data); | ||||
$aliases = $aliases + $windows_zones; | $aliases = $aliases + $windows_zones; | ||||
} | } | ||||
if (isset($aliases[$tzid])) { | if (isset($aliases[$tzid])) { | ||||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |