From b5f589c323f415bb42ea7069cb4d1a8a2233dd69 Mon Sep 17 00:00:00 2001 From: Minteck Date: Wed, 31 Aug 2022 22:03:07 +0200 Subject: Update I guess - Stuffie --- includes/ical/bin/timezones.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 includes/ical/bin/timezones.php (limited to 'includes/ical/bin') diff --git a/includes/ical/bin/timezones.php b/includes/ical/bin/timezones.php new file mode 100644 index 0000000..3bf3708 --- /dev/null +++ b/includes/ical/bin/timezones.php @@ -0,0 +1,20 @@ + + * @license http://www.opensource.org/licenses/mit-license.php MIT License + */ +$windows_timezones = []; +$windowstimezonexml = new DOMDocument(); +$windowstimezonexml->load('https://raw.githubusercontent.com/unicode-org/cldr/master/common/supplemental/windowsZones.xml'); +$zones = $windowstimezonexml->getElementsByTagName('mapZone'); +foreach ($zones as $zone) { + if ($zone->getAttribute('territory') === '001') { + $windows_timezones[$zone->getAttribute('other')] = $zone->getAttribute('type'); + } +} + +file_put_contents(__DIR__ . '/../src/WindowsTimezones.php', "