update icalparser to 1e68aae75dbac8f7c27df7b047c0404154d436c4 (supports php 8.2)
This commit is contained in:
parent
d48cf5c579
commit
05f1245d30
27 changed files with 1572 additions and 586 deletions
20
include/icalparser/bin/timezones.php
Normal file
20
include/icalparser/bin/timezones.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This file generates a map from windows timezones to tz database timezones
|
||||
*
|
||||
* @author Clement Wong <cw@clement.hk>
|
||||
* @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', "<?php\n\$windows_timezones = " . var_export($windows_timezones, true) . ';');
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue