[Pkg-owncloud-commits] [php-sabre-vobject] 01/128: Externalized and updated timezone mappings.

David Prévot taffit at moszumanska.debian.org
Tue May 20 23:10:57 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabre-vobject.

commit 91cf921732569957cdf129cb079c08640ab62d80
Author: Evert Pot <evert at rooftopsolutions.nl>
Date:   Tue Oct 15 11:58:17 2013 +0100

    Externalized and updated timezone mappings.
    
    Now includes a script that grabs and update our windows timezone file
    from unicode.org.
    
    Since this is a BC break, we've bumped the version to 3.2.0
---
 ChangeLog                                        |   5 +
 bin/fetch_tz_data.php                            |  47 ++++
 lib/Sabre/VObject/TimeZoneUtil.php               | 304 ++---------------------
 lib/Sabre/VObject/Version.php                    |   2 +-
 lib/Sabre/VObject/timezonedata/exchangezones.php |  93 +++++++
 lib/Sabre/VObject/timezonedata/lotuszones.php    | 101 ++++++++
 lib/Sabre/VObject/timezonedata/windowszones.php  | 114 +++++++++
 tests/Sabre/VObject/TimeZoneUtilTest.php         |   2 +
 8 files changed, 382 insertions(+), 286 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 604743f..b6e781b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+3.2.0-stable (2013-??-??)
+	* Updated: Windows timezone mapping to latest version from unicode.org
+	* Changed: The timezone maps are now loaded in from external files, in
+	  lib/Sabre/VObject/timezonedata.
+
 3.1.3-stable (2013-10-02)
 	* Fixed: Support from properties from draft-daboo-valarm-extensions-04.
 	  Issue #56.
diff --git a/bin/fetch_tz_data.php b/bin/fetch_tz_data.php
new file mode 100755
index 0000000..339b7b2
--- /dev/null
+++ b/bin/fetch_tz_data.php
@@ -0,0 +1,47 @@
+#!/usr/bin/env php
+<?php
+
+$windowsZonesUrl = 'http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml';
+$outputFile = __DIR__ . '/../lib/Sabre/VObject/timezonedata/windowszones.php';
+
+echo "Fetching timezone map from: " . $windowsZonesUrl, "\n";
+
+$data = file_get_contents($windowsZonesUrl);
+
+$xml = simplexml_load_string($data);
+
+$map = [];
+
+foreach($xml->xpath('//mapZone') as $mapZone) {
+
+    $from = (string)$mapZone['other'];
+    $to = (string)$mapZone['type'];
+
+    list($to) = explode(' ', $to, 2);
+
+    if (!isset($map[$from])) {
+        $map[$from] = $to;
+    }
+
+}
+
+ksort($map);
+echo "Writing to: $outputFile\n";
+
+$f = fopen($outputFile,'w');
+fwrite($f, "<?php\n\n");
+fwrite($f, "/**\n");
+fwrite($f, " * Automatically generated timezone file\n");
+fwrite($f, " *\n");
+fwrite($f, " * Last update: " . date(DATE_W3C) . "\n");
+fwrite($f, " * Source: " .$windowsZonesUrl . "\n");
+fwrite($f, " *\n");
+fwrite($f, " * @copyright Copyright (C) 2007-2013 fruux GmbH (https://fruux.com/).\n");
+fwrite($f, " * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License\n");
+fwrite($f, " */\n");
+fwrite($f, "\n");
+fwrite($f, "return ");
+fwrite($f, var_export($map, true) . ';');
+fclose($f);
+
+echo "Done\n";
diff --git a/lib/Sabre/VObject/TimeZoneUtil.php b/lib/Sabre/VObject/TimeZoneUtil.php
index a7d51b6..9cf5563 100644
--- a/lib/Sabre/VObject/TimeZoneUtil.php
+++ b/lib/Sabre/VObject/TimeZoneUtil.php
@@ -14,291 +14,7 @@ namespace Sabre\VObject;
  */
 class TimeZoneUtil {
 
-    public static $map = array(
-
-        // from http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/zone_tzid.html
-        // snapshot taken on 2012/01/16
-
-        // windows
-        'AUS Central Standard Time'=>'Australia/Darwin',
-        'AUS Eastern Standard Time'=>'Australia/Sydney',
-        'Afghanistan Standard Time'=>'Asia/Kabul',
-        'Alaskan Standard Time'=>'America/Anchorage',
-        'Arab Standard Time'=>'Asia/Riyadh',
-        'Arabian Standard Time'=>'Asia/Dubai',
-        'Arabic Standard Time'=>'Asia/Baghdad',
-        'Argentina Standard Time'=>'America/Buenos_Aires',
-        'Armenian Standard Time'=>'Asia/Yerevan',
-        'Atlantic Standard Time'=>'America/Halifax',
-        'Azerbaijan Standard Time'=>'Asia/Baku',
-        'Azores Standard Time'=>'Atlantic/Azores',
-        'Bangladesh Standard Time'=>'Asia/Dhaka',
-        'Canada Central Standard Time'=>'America/Regina',
-        'Cape Verde Standard Time'=>'Atlantic/Cape_Verde',
-        'Caucasus Standard Time'=>'Asia/Yerevan',
-        'Cen. Australia Standard Time'=>'Australia/Adelaide',
-        'Central America Standard Time'=>'America/Guatemala',
-        'Central Asia Standard Time'=>'Asia/Almaty',
-        'Central Brazilian Standard Time'=>'America/Cuiaba',
-        'Central Europe Standard Time'=>'Europe/Budapest',
-        'Central European Standard Time'=>'Europe/Warsaw',
-        'Central Pacific Standard Time'=>'Pacific/Guadalcanal',
-        'Central Standard Time'=>'America/Chicago',
-        'Central Standard Time (Mexico)'=>'America/Mexico_City',
-        'China Standard Time'=>'Asia/Shanghai',
-        'Dateline Standard Time'=>'Etc/GMT+12',
-        'E. Africa Standard Time'=>'Africa/Nairobi',
-        'E. Australia Standard Time'=>'Australia/Brisbane',
-        'E. Europe Standard Time'=>'Europe/Minsk',
-        'E. South America Standard Time'=>'America/Sao_Paulo',
-        'Eastern Standard Time'=>'America/New_York',
-        'Egypt Standard Time'=>'Africa/Cairo',
-        'Ekaterinburg Standard Time'=>'Asia/Yekaterinburg',
-        'FLE Standard Time'=>'Europe/Kiev',
-        'Fiji Standard Time'=>'Pacific/Fiji',
-        'GMT Standard Time'=>'Europe/London',
-        'GTB Standard Time'=>'Europe/Istanbul',
-        'Georgian Standard Time'=>'Asia/Tbilisi',
-        'Greenland Standard Time'=>'America/Godthab',
-        'Greenwich Standard Time'=>'Atlantic/Reykjavik',
-        'Hawaiian Standard Time'=>'Pacific/Honolulu',
-        'India Standard Time'=>'Asia/Calcutta',
-        'Iran Standard Time'=>'Asia/Tehran',
-        'Israel Standard Time'=>'Asia/Jerusalem',
-        'Jordan Standard Time'=>'Asia/Amman',
-        'Kamchatka Standard Time'=>'Asia/Kamchatka',
-        'Korea Standard Time'=>'Asia/Seoul',
-        'Magadan Standard Time'=>'Asia/Magadan',
-        'Mauritius Standard Time'=>'Indian/Mauritius',
-        'Mexico Standard Time'=>'America/Mexico_City',
-        'Mexico Standard Time 2'=>'America/Chihuahua',
-        'Mid-Atlantic Standard Time'=>'Etc/GMT-2',
-        'Middle East Standard Time'=>'Asia/Beirut',
-        'Montevideo Standard Time'=>'America/Montevideo',
-        'Morocco Standard Time'=>'Africa/Casablanca',
-        'Mountain Standard Time'=>'America/Denver',
-        'Mountain Standard Time (Mexico)'=>'America/Chihuahua',
-        'Myanmar Standard Time'=>'Asia/Rangoon',
-        'N. Central Asia Standard Time'=>'Asia/Novosibirsk',
-        'Namibia Standard Time'=>'Africa/Windhoek',
-        'Nepal Standard Time'=>'Asia/Katmandu',
-        'New Zealand Standard Time'=>'Pacific/Auckland',
-        'Newfoundland Standard Time'=>'America/St_Johns',
-        'North Asia East Standard Time'=>'Asia/Irkutsk',
-        'North Asia Standard Time'=>'Asia/Krasnoyarsk',
-        'Pacific SA Standard Time'=>'America/Santiago',
-        'Pacific Standard Time'=>'America/Los_Angeles',
-        'Pacific Standard Time (Mexico)'=>'America/Santa_Isabel',
-        'Pakistan Standard Time'=>'Asia/Karachi',
-        'Paraguay Standard Time'=>'America/Asuncion',
-        'Romance Standard Time'=>'Europe/Paris',
-        'Russian Standard Time'=>'Europe/Moscow',
-        'SA Eastern Standard Time'=>'America/Cayenne',
-        'SA Pacific Standard Time'=>'America/Bogota',
-        'SA Western Standard Time'=>'America/La_Paz',
-        'SE Asia Standard Time'=>'Asia/Bangkok',
-        'Samoa Standard Time'=>'Pacific/Apia',
-        'Singapore Standard Time'=>'Asia/Singapore',
-        'South Africa Standard Time'=>'Africa/Johannesburg',
-        'Sri Lanka Standard Time'=>'Asia/Colombo',
-        'Syria Standard Time'=>'Asia/Damascus',
-        'Taipei Standard Time'=>'Asia/Taipei',
-        'Tasmania Standard Time'=>'Australia/Hobart',
-        'Tokyo Standard Time'=>'Asia/Tokyo',
-        'Tonga Standard Time'=>'Pacific/Tongatapu',
-        'US Eastern Standard Time'=>'America/Indianapolis',
-        'US Mountain Standard Time'=>'America/Phoenix',
-        'UTC+12'=>'Etc/GMT-12',
-        'UTC-02'=>'Etc/GMT+2',
-        'UTC-11'=>'Etc/GMT+11',
-        'Ulaanbaatar Standard Time'=>'Asia/Ulaanbaatar',
-        'Venezuela Standard Time'=>'America/Caracas',
-        'Vladivostok Standard Time'=>'Asia/Vladivostok',
-        'W. Australia Standard Time'=>'Australia/Perth',
-        'W. Central Africa Standard Time'=>'Africa/Lagos',
-        'W. Europe Standard Time'=>'Europe/Berlin',
-        'West Asia Standard Time'=>'Asia/Tashkent',
-        'West Pacific Standard Time'=>'Pacific/Port_Moresby',
-        'Yakutsk Standard Time'=>'Asia/Yakutsk',
-
-        // Microsoft exchange timezones
-        // Source:
-        // http://msdn.microsoft.com/en-us/library/ms988620%28v=exchg.65%29.aspx
-        //
-        // Correct timezones deduced with help from:
-        // http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
-        'Universal Coordinated Time' => 'UTC',
-        'Casablanca, Monrovia' => 'Africa/Casablanca',
-        'Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London' => 'Europe/Lisbon',
-        'Greenwich Mean Time; Dublin, Edinburgh, London' =>  'Europe/London',
-        'Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna' => 'Europe/Berlin',
-        'Belgrade, Pozsony, Budapest, Ljubljana, Prague' => 'Europe/Prague',
-        'Brussels, Copenhagen, Madrid, Paris' => 'Europe/Paris',
-        'Paris, Madrid, Brussels, Copenhagen' => 'Europe/Paris',
-        'Prague, Central Europe' => 'Europe/Prague',
-        'Sarajevo, Skopje, Sofija, Vilnius, Warsaw, Zagreb' => 'Europe/Sarajevo',
-        'West Central Africa' => 'Africa/Luanda', // This was a best guess
-        'Athens, Istanbul, Minsk' => 'Europe/Athens',
-        'Bucharest' => 'Europe/Bucharest',
-        'Cairo' => 'Africa/Cairo',
-        'Harare, Pretoria' => 'Africa/Harare',
-        'Helsinki, Riga, Tallinn' => 'Europe/Helsinki',
-        'Israel, Jerusalem Standard Time' => 'Asia/Jerusalem',
-        'Baghdad' => 'Asia/Baghdad',
-        'Arab, Kuwait, Riyadh' => 'Asia/Kuwait',
-        'Moscow, St. Petersburg, Volgograd' => 'Europe/Moscow',
-        'East Africa, Nairobi' => 'Africa/Nairobi',
-        'Tehran' => 'Asia/Tehran',
-        'Abu Dhabi, Muscat' => 'Asia/Muscat', // Best guess
-        'Baku, Tbilisi, Yerevan' => 'Asia/Baku',
-        'Kabul' => 'Asia/Kabul',
-        'Ekaterinburg' => 'Asia/Yekaterinburg',
-        'Islamabad, Karachi, Tashkent' => 'Asia/Karachi',
-        'Kolkata, Chennai, Mumbai, New Delhi, India Standard Time' => 'Asia/Calcutta',
-        'Kathmandu, Nepal' => 'Asia/Kathmandu',
-        'Almaty, Novosibirsk, North Central Asia' => 'Asia/Almaty',
-        'Astana, Dhaka' => 'Asia/Dhaka',
-        'Sri Jayawardenepura, Sri Lanka' => 'Asia/Colombo',
-        'Rangoon' => 'Asia/Rangoon',
-        'Bangkok, Hanoi, Jakarta' => 'Asia/Bangkok',
-        'Krasnoyarsk' => 'Asia/Krasnoyarsk',
-        'Beijing, Chongqing, Hong Kong SAR, Urumqi' => 'Asia/Shanghai',
-        'Irkutsk, Ulaan Bataar' => 'Asia/Irkutsk',
-        'Kuala Lumpur, Singapore' => 'Asia/Singapore',
-        'Perth, Western Australia' => 'Australia/Perth',
-        'Taipei' => 'Asia/Taipei',
-        'Osaka, Sapporo, Tokyo' => 'Asia/Tokyo',
-        'Seoul, Korea Standard time' => 'Asia/Seoul',
-        'Yakutsk' => 'Asia/Yakutsk',
-        'Adelaide, Central Australia' => 'Australia/Adelaide',
-        'Darwin' => 'Australia/Darwin',
-        'Brisbane, East Australia' => 'Australia/Brisbane',
-        'Canberra, Melbourne, Sydney, Hobart (year 2000 only)' => 'Australia/Sydney',
-        'Guam, Port Moresby' => 'Pacific/Guam',
-        'Hobart, Tasmania' => 'Australia/Hobart',
-        'Vladivostok' => 'Asia/Vladivostok',
-        'Magadan, Solomon Is., New Caledonia' => 'Asia/Magadan',
-        'Auckland, Wellington' => 'Pacific/Auckland',
-        'Fiji Islands, Kamchatka, Marshall Is.' => 'Pacific/Fiji',
-        'Nuku\'alofa, Tonga' => 'Pacific/Tongatapu',
-        'Azores' => 'Atlantic/Azores',
-        'Cape Verde Is.' => 'Atlantic/Cape_Verde',
-        'Mid-Atlantic' => 'America/Noronha',
-        'Brasilia' => 'America/Sao_Paulo', // Best guess
-        'Buenos Aires' => 'America/Argentina/Buenos_Aires',
-        'Greenland' => 'America/Godthab',
-        'Newfoundland' => 'America/St_Johns',
-        'Atlantic Time (Canada)' => 'America/Halifax',
-        'Caracas, La Paz' => 'America/Caracas',
-        'Santiago' => 'America/Santiago',
-        'Bogota, Lima, Quito' => 'America/Bogota',
-        'Eastern Time (US & Canada)' => 'America/New_York',
-        'Indiana (East)' => 'America/Indiana/Indianapolis',
-        'Central America' => 'America/Guatemala',
-        'Central Time (US & Canada)' => 'America/Chicago',
-        'Mexico City, Tegucigalpa' => 'America/Mexico_City',
-        'Saskatchewan' => 'America/Edmonton',
-        'Arizona' => 'America/Phoenix',
-        'Mountain Time (US & Canada)' => 'America/Denver', // Best guess
-        'Pacific Time (US & Canada); Tijuana' => 'America/Los_Angeles', // Best guess
-        'Alaska' => 'America/Anchorage',
-        'Hawaii' => 'Pacific/Honolulu',
-        'Midway Island, Samoa' => 'Pacific/Midway',
-        'Eniwetok, Kwajalein, Dateline Time' => 'Pacific/Kwajalein',
-
-        // The following list are timezone names that could be generated by
-        // Lotus / Domino
-        'Dateline'               => 'Etc/GMT-12',
-        'Samoa'                  => 'Pacific/Apia',
-        'Hawaiian'               => 'Pacific/Honolulu',
-        'Alaskan'                => 'America/Anchorage',
-        'Pacific'                => 'America/Los_Angeles',
-        'Pacific Standard Time'  => 'America/Los_Angeles',
-        'Mexico Standard Time 2' => 'America/Chihuahua',
-        'Mountain'               => 'America/Denver',
-        'Mountain Standard Time' => 'America/Chihuahua',
-        'US Mountain'            => 'America/Phoenix',
-        'Canada Central'         => 'America/Edmonton',
-        'Central America'        => 'America/Guatemala',
-        'Central'                => 'America/Chicago',
-        'Central Standard Time'  => 'America/Mexico_City',
-        'Mexico'                 => 'America/Mexico_City',
-        'Eastern'                => 'America/New_York',
-        'SA Pacific'             => 'America/Bogota',
-        'US Eastern'             => 'America/Indiana/Indianapolis',
-        'Venezuela'              => 'America/Caracas',
-        'Atlantic'               => 'America/Halifax',
-        'Central Brazilian'      => 'America/Manaus',
-        'Pacific SA'             => 'America/Santiago',
-        'SA Western'             => 'America/La_Paz',
-        'Newfoundland'           => 'America/St_Johns',
-        'Argentina'              => 'America/Argentina/Buenos_Aires',
-        'E. South America'       => 'America/Belem',
-        'Greenland'              => 'America/Godthab',
-        'Montevideo'             => 'America/Montevideo',
-        'SA Eastern'             => 'America/Belem',
-        'Mid-Atlantic'           => 'Etc/GMT-2',
-        'Azores'                 => 'Atlantic/Azores',
-        'Cape Verde'             => 'Atlantic/Cape_Verde',
-        'Greenwich'              => 'Atlantic/Reykjavik', // No I'm serious.. Greenwich is not GMT.
-        'Morocco'                => 'Africa/Casablanca',
-        'Central Europe'         => 'Europe/Prague',
-        'Central European'       => 'Europe/Sarajevo',
-        'Romance'                => 'Europe/Paris',
-        'W. Central Africa'      => 'Africa/Lagos', // Best guess
-        'W. Europe'              => 'Europe/Amsterdam',
-        'E. Europe'              => 'Europe/Minsk',
-        'Egypt'                  => 'Africa/Cairo',
-        'FLE'                    => 'Europe/Helsinki',
-        'GTB'                    => 'Europe/Athens',
-        'Israel'                 => 'Asia/Jerusalem',
-        'Jordan'                 => 'Asia/Amman',
-        'Middle East'            => 'Asia/Beirut',
-        'Namibia'                => 'Africa/Windhoek',
-        'South Africa'           => 'Africa/Harare',
-        'Arab'                   => 'Asia/Kuwait',
-        'Arabic'                 => 'Asia/Baghdad',
-        'E. Africa'              => 'Africa/Nairobi',
-        'Georgian'               => 'Asia/Tbilisi',
-        'Russian'                => 'Europe/Moscow',
-        'Iran'                   => 'Asia/Tehran',
-        'Arabian'                => 'Asia/Muscat',
-        'Armenian'               => 'Asia/Yerevan',
-        'Azerbijan'              => 'Asia/Baku',
-        'Caucasus'               => 'Asia/Yerevan',
-        'Mauritius'              => 'Indian/Mauritius',
-        'Afghanistan'            => 'Asia/Kabul',
-        'Ekaterinburg'           => 'Asia/Yekaterinburg',
-        'Pakistan'               => 'Asia/Karachi',
-        'West Asia'              => 'Asia/Tashkent',
-        'India'                  => 'Asia/Calcutta',
-        'Sri Lanka'              => 'Asia/Colombo',
-        'Nepal'                  => 'Asia/Kathmandu',
-        'Central Asia'           => 'Asia/Dhaka',
-        'N. Central Asia'        => 'Asia/Almaty',
-        'Myanmar'                => 'Asia/Rangoon',
-        'North Asia'             => 'Asia/Krasnoyarsk',
-        'SE Asia'                => 'Asia/Bangkok',
-        'China'                  => 'Asia/Shanghai',
-        'North Asia East'        => 'Asia/Irkutsk',
-        'Singapore'              => 'Asia/Singapore',
-        'Taipei'                 => 'Asia/Taipei',
-        'W. Australia'           => 'Australia/Perth',
-        'Korea'                  => 'Asia/Seoul',
-        'Tokyo'                  => 'Asia/Tokyo',
-        'Yakutsk'                => 'Asia/Yakutsk',
-        'AUS Central'            => 'Australia/Darwin',
-        'Cen. Australia'         => 'Australia/Adelaide',
-        'AUS Eastern'            => 'Australia/Sydney',
-        'E. Australia'           => 'Australia/Brisbane',
-        'Tasmania'               => 'Australia/Hobart',
-        'Vladivostok'            => 'Asia/Vladivostok',
-        'West Pacific'           => 'Pacific/Guam',
-        'Central Pacific'        => 'Asia/Magadan',
-        'Fiji'                   => 'Pacific/Fiji',
-        'New Zealand'            => 'Pacific/Auckland',
-        'Tonga'                  => 'Pacific/Tongatapu',
-    );
+    public static $map = null;
 
     /**
      * List of microsoft exchange timezone ids.
@@ -413,6 +129,8 @@ class TimeZoneUtil {
         } catch (\Exception $e) {
         }
 
+        self::loadTzMaps();
+
         // Next, we check if the tzid is somewhere in our tzid map.
         if (isset(self::$map[$tzid])) {
             return new \DateTimeZone(self::$map[$tzid]);
@@ -479,4 +197,20 @@ class TimeZoneUtil {
 
     }
 
+    /**
+     * This method will load in all the tz mapping information, if it's not yet
+     * done.
+     */
+    static function loadTzMaps() {
+
+        if (!is_null(self::$map)) return;
+
+        self::$map = array_merge(
+            include __DIR__ .  '/timezonedata/windowszones.php',
+            include __DIR__ .  '/timezonedata/lotuszones.php',
+            include __DIR__ .  '/timezonedata/exchangezones.php'
+        );
+
+    }
+
 }
diff --git a/lib/Sabre/VObject/Version.php b/lib/Sabre/VObject/Version.php
index efb129a..10a1c33 100644
--- a/lib/Sabre/VObject/Version.php
+++ b/lib/Sabre/VObject/Version.php
@@ -14,6 +14,6 @@ class Version {
     /**
      * Full version number
      */
-    const VERSION = '3.1.3';
+    const VERSION = '3.2.0';
 
 }
diff --git a/lib/Sabre/VObject/timezonedata/exchangezones.php b/lib/Sabre/VObject/timezonedata/exchangezones.php
new file mode 100644
index 0000000..5a57945
--- /dev/null
+++ b/lib/Sabre/VObject/timezonedata/exchangezones.php
@@ -0,0 +1,93 @@
+<?php
+
+/**
+ * Microsoft exchange timezones
+ * Source:
+ * http://msdn.microsoft.com/en-us/library/ms988620%28v=exchg.65%29.aspx
+ *
+ * Correct timezones deduced with help from:
+ * http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
+ *
+ * @copyright Copyright (C) 2007-2013 fruux GmbH (https://fruux.com/).
+ * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
+ */
+return array(
+    'Universal Coordinated Time' => 'UTC',
+    'Casablanca, Monrovia' => 'Africa/Casablanca',
+    'Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London' => 'Europe/Lisbon',
+    'Greenwich Mean Time; Dublin, Edinburgh, London' =>  'Europe/London',
+    'Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna' => 'Europe/Berlin',
+    'Belgrade, Pozsony, Budapest, Ljubljana, Prague' => 'Europe/Prague',
+    'Brussels, Copenhagen, Madrid, Paris' => 'Europe/Paris',
+    'Paris, Madrid, Brussels, Copenhagen' => 'Europe/Paris',
+    'Prague, Central Europe' => 'Europe/Prague',
+    'Sarajevo, Skopje, Sofija, Vilnius, Warsaw, Zagreb' => 'Europe/Sarajevo',
+    'West Central Africa' => 'Africa/Luanda', // This was a best guess
+    'Athens, Istanbul, Minsk' => 'Europe/Athens',
+    'Bucharest' => 'Europe/Bucharest',
+    'Cairo' => 'Africa/Cairo',
+    'Harare, Pretoria' => 'Africa/Harare',
+    'Helsinki, Riga, Tallinn' => 'Europe/Helsinki',
+    'Israel, Jerusalem Standard Time' => 'Asia/Jerusalem',
+    'Baghdad' => 'Asia/Baghdad',
+    'Arab, Kuwait, Riyadh' => 'Asia/Kuwait',
+    'Moscow, St. Petersburg, Volgograd' => 'Europe/Moscow',
+    'East Africa, Nairobi' => 'Africa/Nairobi',
+    'Tehran' => 'Asia/Tehran',
+    'Abu Dhabi, Muscat' => 'Asia/Muscat', // Best guess
+    'Baku, Tbilisi, Yerevan' => 'Asia/Baku',
+    'Kabul' => 'Asia/Kabul',
+    'Ekaterinburg' => 'Asia/Yekaterinburg',
+    'Islamabad, Karachi, Tashkent' => 'Asia/Karachi',
+    'Kolkata, Chennai, Mumbai, New Delhi, India Standard Time' => 'Asia/Calcutta',
+    'Kathmandu, Nepal' => 'Asia/Kathmandu',
+    'Almaty, Novosibirsk, North Central Asia' => 'Asia/Almaty',
+    'Astana, Dhaka' => 'Asia/Dhaka',
+    'Sri Jayawardenepura, Sri Lanka' => 'Asia/Colombo',
+    'Rangoon' => 'Asia/Rangoon',
+    'Bangkok, Hanoi, Jakarta' => 'Asia/Bangkok',
+    'Krasnoyarsk' => 'Asia/Krasnoyarsk',
+    'Beijing, Chongqing, Hong Kong SAR, Urumqi' => 'Asia/Shanghai',
+    'Irkutsk, Ulaan Bataar' => 'Asia/Irkutsk',
+    'Kuala Lumpur, Singapore' => 'Asia/Singapore',
+    'Perth, Western Australia' => 'Australia/Perth',
+    'Taipei' => 'Asia/Taipei',
+    'Osaka, Sapporo, Tokyo' => 'Asia/Tokyo',
+    'Seoul, Korea Standard time' => 'Asia/Seoul',
+    'Yakutsk' => 'Asia/Yakutsk',
+    'Adelaide, Central Australia' => 'Australia/Adelaide',
+    'Darwin' => 'Australia/Darwin',
+    'Brisbane, East Australia' => 'Australia/Brisbane',
+    'Canberra, Melbourne, Sydney, Hobart (year 2000 only)' => 'Australia/Sydney',
+    'Guam, Port Moresby' => 'Pacific/Guam',
+    'Hobart, Tasmania' => 'Australia/Hobart',
+    'Vladivostok' => 'Asia/Vladivostok',
+    'Magadan, Solomon Is., New Caledonia' => 'Asia/Magadan',
+    'Auckland, Wellington' => 'Pacific/Auckland',
+    'Fiji Islands, Kamchatka, Marshall Is.' => 'Pacific/Fiji',
+    'Nuku\'alofa, Tonga' => 'Pacific/Tongatapu',
+    'Azores' => 'Atlantic/Azores',
+    'Cape Verde Is.' => 'Atlantic/Cape_Verde',
+    'Mid-Atlantic' => 'America/Noronha',
+    'Brasilia' => 'America/Sao_Paulo', // Best guess
+    'Buenos Aires' => 'America/Argentina/Buenos_Aires',
+    'Greenland' => 'America/Godthab',
+    'Newfoundland' => 'America/St_Johns',
+    'Atlantic Time (Canada)' => 'America/Halifax',
+    'Caracas, La Paz' => 'America/Caracas',
+    'Santiago' => 'America/Santiago',
+    'Bogota, Lima, Quito' => 'America/Bogota',
+    'Eastern Time (US & Canada)' => 'America/New_York',
+    'Indiana (East)' => 'America/Indiana/Indianapolis',
+    'Central America' => 'America/Guatemala',
+    'Central Time (US & Canada)' => 'America/Chicago',
+    'Mexico City, Tegucigalpa' => 'America/Mexico_City',
+    'Saskatchewan' => 'America/Edmonton',
+    'Arizona' => 'America/Phoenix',
+    'Mountain Time (US & Canada)' => 'America/Denver', // Best guess
+    'Pacific Time (US & Canada); Tijuana' => 'America/Los_Angeles', // Best guess
+    'Alaska' => 'America/Anchorage',
+    'Hawaii' => 'Pacific/Honolulu',
+    'Midway Island, Samoa' => 'Pacific/Midway',
+    'Eniwetok, Kwajalein, Dateline Time' => 'Pacific/Kwajalein',
+);
diff --git a/lib/Sabre/VObject/timezonedata/lotuszones.php b/lib/Sabre/VObject/timezonedata/lotuszones.php
new file mode 100644
index 0000000..8523583
--- /dev/null
+++ b/lib/Sabre/VObject/timezonedata/lotuszones.php
@@ -0,0 +1,101 @@
+<?php
+
+/**
+ * The following list are timezone names that could be generated by
+ * Lotus / Domino
+ *
+ * @copyright Copyright (C) 2007-2013 fruux GmbH (https://fruux.com/).
+ * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
+ */
+return array(
+    'Dateline'               => 'Etc/GMT-12',
+    'Samoa'                  => 'Pacific/Apia',
+    'Hawaiian'               => 'Pacific/Honolulu',
+    'Alaskan'                => 'America/Anchorage',
+    'Pacific'                => 'America/Los_Angeles',
+    'Pacific Standard Time'  => 'America/Los_Angeles',
+    'Mexico Standard Time 2' => 'America/Chihuahua',
+    'Mountain'               => 'America/Denver',
+    'Mountain Standard Time' => 'America/Chihuahua',
+    'US Mountain'            => 'America/Phoenix',
+    'Canada Central'         => 'America/Edmonton',
+    'Central America'        => 'America/Guatemala',
+    'Central'                => 'America/Chicago',
+    'Central Standard Time'  => 'America/Mexico_City',
+    'Mexico'                 => 'America/Mexico_City',
+    'Eastern'                => 'America/New_York',
+    'SA Pacific'             => 'America/Bogota',
+    'US Eastern'             => 'America/Indiana/Indianapolis',
+    'Venezuela'              => 'America/Caracas',
+    'Atlantic'               => 'America/Halifax',
+    'Central Brazilian'      => 'America/Manaus',
+    'Pacific SA'             => 'America/Santiago',
+    'SA Western'             => 'America/La_Paz',
+    'Newfoundland'           => 'America/St_Johns',
+    'Argentina'              => 'America/Argentina/Buenos_Aires',
+    'E. South America'       => 'America/Belem',
+    'Greenland'              => 'America/Godthab',
+    'Montevideo'             => 'America/Montevideo',
+    'SA Eastern'             => 'America/Belem',
+    'Mid-Atlantic'           => 'Etc/GMT-2',
+    'Azores'                 => 'Atlantic/Azores',
+    'Cape Verde'             => 'Atlantic/Cape_Verde',
+    'Greenwich'              => 'Atlantic/Reykjavik', // No I'm serious.. Greenwich is not GMT.
+    'Morocco'                => 'Africa/Casablanca',
+    'Central Europe'         => 'Europe/Prague',
+    'Central European'       => 'Europe/Sarajevo',
+    'Romance'                => 'Europe/Paris',
+    'W. Central Africa'      => 'Africa/Lagos', // Best guess
+    'W. Europe'              => 'Europe/Amsterdam',
+    'E. Europe'              => 'Europe/Minsk',
+    'Egypt'                  => 'Africa/Cairo',
+    'FLE'                    => 'Europe/Helsinki',
+    'GTB'                    => 'Europe/Athens',
+    'Israel'                 => 'Asia/Jerusalem',
+    'Jordan'                 => 'Asia/Amman',
+    'Middle East'            => 'Asia/Beirut',
+    'Namibia'                => 'Africa/Windhoek',
+    'South Africa'           => 'Africa/Harare',
+    'Arab'                   => 'Asia/Kuwait',
+    'Arabic'                 => 'Asia/Baghdad',
+    'E. Africa'              => 'Africa/Nairobi',
+    'Georgian'               => 'Asia/Tbilisi',
+    'Russian'                => 'Europe/Moscow',
+    'Iran'                   => 'Asia/Tehran',
+    'Arabian'                => 'Asia/Muscat',
+    'Armenian'               => 'Asia/Yerevan',
+    'Azerbijan'              => 'Asia/Baku',
+    'Caucasus'               => 'Asia/Yerevan',
+    'Mauritius'              => 'Indian/Mauritius',
+    'Afghanistan'            => 'Asia/Kabul',
+    'Ekaterinburg'           => 'Asia/Yekaterinburg',
+    'Pakistan'               => 'Asia/Karachi',
+    'West Asia'              => 'Asia/Tashkent',
+    'India'                  => 'Asia/Calcutta',
+    'Sri Lanka'              => 'Asia/Colombo',
+    'Nepal'                  => 'Asia/Kathmandu',
+    'Central Asia'           => 'Asia/Dhaka',
+    'N. Central Asia'        => 'Asia/Almaty',
+    'Myanmar'                => 'Asia/Rangoon',
+    'North Asia'             => 'Asia/Krasnoyarsk',
+    'SE Asia'                => 'Asia/Bangkok',
+    'China'                  => 'Asia/Shanghai',
+    'North Asia East'        => 'Asia/Irkutsk',
+    'Singapore'              => 'Asia/Singapore',
+    'Taipei'                 => 'Asia/Taipei',
+    'W. Australia'           => 'Australia/Perth',
+    'Korea'                  => 'Asia/Seoul',
+    'Tokyo'                  => 'Asia/Tokyo',
+    'Yakutsk'                => 'Asia/Yakutsk',
+    'AUS Central'            => 'Australia/Darwin',
+    'Cen. Australia'         => 'Australia/Adelaide',
+    'AUS Eastern'            => 'Australia/Sydney',
+    'E. Australia'           => 'Australia/Brisbane',
+    'Tasmania'               => 'Australia/Hobart',
+    'Vladivostok'            => 'Asia/Vladivostok',
+    'West Pacific'           => 'Pacific/Guam',
+    'Central Pacific'        => 'Asia/Magadan',
+    'Fiji'                   => 'Pacific/Fiji',
+    'New Zealand'            => 'Pacific/Auckland',
+    'Tonga'                  => 'Pacific/Tongatapu',
+);
diff --git a/lib/Sabre/VObject/timezonedata/windowszones.php b/lib/Sabre/VObject/timezonedata/windowszones.php
new file mode 100644
index 0000000..b8905ea
--- /dev/null
+++ b/lib/Sabre/VObject/timezonedata/windowszones.php
@@ -0,0 +1,114 @@
+<?php
+
+/**
+ * Automatically generated timezone file
+ *
+ * Last update: 2013-10-15T12:50:14+02:00
+ * Source: http://unicode.org/repos/cldr/trunk/common/supplemental/windowsZones.xml
+ *
+ * @copyright Copyright (C) 2007-2013 fruux GmbH (https://fruux.com/).
+ * @license http://code.google.com/p/sabredav/wiki/License Modified BSD License
+ */
+
+return array (
+  'AUS Central Standard Time' => 'Australia/Darwin',
+  'AUS Eastern Standard Time' => 'Australia/Sydney',
+  'Afghanistan Standard Time' => 'Asia/Kabul',
+  'Alaskan Standard Time' => 'America/Anchorage',
+  'Arab Standard Time' => 'Asia/Riyadh',
+  'Arabian Standard Time' => 'Asia/Dubai',
+  'Arabic Standard Time' => 'Asia/Baghdad',
+  'Argentina Standard Time' => 'America/Buenos_Aires',
+  'Atlantic Standard Time' => 'America/Halifax',
+  'Azerbaijan Standard Time' => 'Asia/Baku',
+  'Azores Standard Time' => 'Atlantic/Azores',
+  'Bahia Standard Time' => 'America/Bahia',
+  'Bangladesh Standard Time' => 'Asia/Dhaka',
+  'Canada Central Standard Time' => 'America/Regina',
+  'Cape Verde Standard Time' => 'Atlantic/Cape_Verde',
+  'Caucasus Standard Time' => 'Asia/Yerevan',
+  'Cen. Australia Standard Time' => 'Australia/Adelaide',
+  'Central America Standard Time' => 'America/Guatemala',
+  'Central Asia Standard Time' => 'Asia/Almaty',
+  'Central Brazilian Standard Time' => 'America/Cuiaba',
+  'Central Europe Standard Time' => 'Europe/Budapest',
+  'Central European Standard Time' => 'Europe/Warsaw',
+  'Central Pacific Standard Time' => 'Pacific/Guadalcanal',
+  'Central Standard Time' => 'America/Chicago',
+  'Central Standard Time (Mexico)' => 'America/Mexico_City',
+  'China Standard Time' => 'Asia/Shanghai',
+  'Dateline Standard Time' => 'Etc/GMT+12',
+  'E. Africa Standard Time' => 'Africa/Nairobi',
+  'E. Australia Standard Time' => 'Australia/Brisbane',
+  'E. Europe Standard Time' => 'Asia/Nicosia',
+  'E. South America Standard Time' => 'America/Sao_Paulo',
+  'Eastern Standard Time' => 'America/New_York',
+  'Egypt Standard Time' => 'Africa/Cairo',
+  'Ekaterinburg Standard Time' => 'Asia/Yekaterinburg',
+  'FLE Standard Time' => 'Europe/Kiev',
+  'Fiji Standard Time' => 'Pacific/Fiji',
+  'GMT Standard Time' => 'Europe/London',
+  'GTB Standard Time' => 'Europe/Bucharest',
+  'Georgian Standard Time' => 'Asia/Tbilisi',
+  'Greenland Standard Time' => 'America/Godthab',
+  'Greenwich Standard Time' => 'Atlantic/Reykjavik',
+  'Hawaiian Standard Time' => 'Pacific/Honolulu',
+  'India Standard Time' => 'Asia/Calcutta',
+  'Iran Standard Time' => 'Asia/Tehran',
+  'Israel Standard Time' => 'Asia/Jerusalem',
+  'Jordan Standard Time' => 'Asia/Amman',
+  'Kaliningrad Standard Time' => 'Europe/Kaliningrad',
+  'Korea Standard Time' => 'Asia/Seoul',
+  'Libya Standard Time' => 'Africa/Tripoli',
+  'Magadan Standard Time' => 'Asia/Magadan',
+  'Mauritius Standard Time' => 'Indian/Mauritius',
+  'Middle East Standard Time' => 'Asia/Beirut',
+  'Montevideo Standard Time' => 'America/Montevideo',
+  'Morocco Standard Time' => 'Africa/Casablanca',
+  'Mountain Standard Time' => 'America/Denver',
+  'Mountain Standard Time (Mexico)' => 'America/Chihuahua',
+  'Myanmar Standard Time' => 'Asia/Rangoon',
+  'N. Central Asia Standard Time' => 'Asia/Novosibirsk',
+  'Namibia Standard Time' => 'Africa/Windhoek',
+  'Nepal Standard Time' => 'Asia/Katmandu',
+  'New Zealand Standard Time' => 'Pacific/Auckland',
+  'Newfoundland Standard Time' => 'America/St_Johns',
+  'North Asia East Standard Time' => 'Asia/Irkutsk',
+  'North Asia Standard Time' => 'Asia/Krasnoyarsk',
+  'Pacific SA Standard Time' => 'America/Santiago',
+  'Pacific Standard Time' => 'America/Los_Angeles',
+  'Pacific Standard Time (Mexico)' => 'America/Santa_Isabel',
+  'Pakistan Standard Time' => 'Asia/Karachi',
+  'Paraguay Standard Time' => 'America/Asuncion',
+  'Romance Standard Time' => 'Europe/Paris',
+  'Russian Standard Time' => 'Europe/Moscow',
+  'SA Eastern Standard Time' => 'America/Cayenne',
+  'SA Pacific Standard Time' => 'America/Bogota',
+  'SA Western Standard Time' => 'America/La_Paz',
+  'SE Asia Standard Time' => 'Asia/Bangkok',
+  'Samoa Standard Time' => 'Pacific/Apia',
+  'Singapore Standard Time' => 'Asia/Singapore',
+  'South Africa Standard Time' => 'Africa/Johannesburg',
+  'Sri Lanka Standard Time' => 'Asia/Colombo',
+  'Syria Standard Time' => 'Asia/Damascus',
+  'Taipei Standard Time' => 'Asia/Taipei',
+  'Tasmania Standard Time' => 'Australia/Hobart',
+  'Tokyo Standard Time' => 'Asia/Tokyo',
+  'Tonga Standard Time' => 'Pacific/Tongatapu',
+  'Turkey Standard Time' => 'Europe/Istanbul',
+  'US Eastern Standard Time' => 'America/Indianapolis',
+  'US Mountain Standard Time' => 'America/Phoenix',
+  'UTC' => 'Etc/GMT',
+  'UTC+12' => 'Etc/GMT-12',
+  'UTC-02' => 'Etc/GMT+2',
+  'UTC-11' => 'Etc/GMT+11',
+  'Ulaanbaatar Standard Time' => 'Asia/Ulaanbaatar',
+  'Venezuela Standard Time' => 'America/Caracas',
+  'Vladivostok Standard Time' => 'Asia/Vladivostok',
+  'W. Australia Standard Time' => 'Australia/Perth',
+  'W. Central Africa Standard Time' => 'Africa/Lagos',
+  'W. Europe Standard Time' => 'Europe/Berlin',
+  'West Asia Standard Time' => 'Asia/Tashkent',
+  'West Pacific Standard Time' => 'Pacific/Port_Moresby',
+  'Yakutsk Standard Time' => 'Asia/Yakutsk',
+);
diff --git a/tests/Sabre/VObject/TimeZoneUtilTest.php b/tests/Sabre/VObject/TimeZoneUtilTest.php
index 6e32744..b8a675e 100644
--- a/tests/Sabre/VObject/TimeZoneUtilTest.php
+++ b/tests/Sabre/VObject/TimeZoneUtilTest.php
@@ -16,6 +16,8 @@ class TimezoneUtilTest extends \PHPUnit_Framework_TestCase {
 
     function getMapping() {
 
+        TimeZoneUtil::loadTzMaps();
+
         // PHPUNit requires an array of arrays
         return array_map(
             function($value) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git



More information about the Pkg-owncloud-commits mailing list