[california/wip/727239-exchange] Basic plumbing and conversion set up



commit de92610ac939c23392343bc2c7851d07a834997b
Author: Jim Nelson <jim yorba org>
Date:   Wed Apr 16 16:50:39 2014 -0700

    Basic plumbing and conversion set up

 src/Makefile.am                             |    1 +
 src/application/california-application.vala |    2 +-
 src/application/california-resource.vala    |   28 +-
 src/calendar/calendar-olson-zone.vala       |  105 ++++-
 src/calendar/calendar.vala                  |   41 +-
 src/california-resources.xml                |    3 +
 src/rc/windowsZones.xml                     |  653 +++++++++++++++++++++++++++
 src/util/util-string.vala                   |    8 +
 8 files changed, 813 insertions(+), 28 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index f535a81..da0f9b7 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -133,6 +133,7 @@ california_RC = \
        rc/google-login.ui \
        rc/show-event.ui \
        rc/webcal-subscribe.ui \
+       rc/windowsZones.xml \
        $(NULL)
 
 california_OPTIONAL_VALAFLAGS =
diff --git a/src/application/california-application.vala b/src/application/california-application.vala
index 3b7387b..6f3c71b 100644
--- a/src/application/california-application.vala
+++ b/src/application/california-application.vala
@@ -116,7 +116,7 @@ public class Application : Gtk.Application {
         }
         
         add_action_entries(action_entries, this);
-        set_app_menu(Resource.load<MenuModel>("app-menu.interface", "app-menu"));
+        set_app_menu(Resource.load_object<MenuModel>("app-menu.interface", "app-menu"));
     }
     
     // This method is invoked when the main loop terminates on the primary instance.
diff --git a/src/application/california-resource.vala b/src/application/california-resource.vala
index 129acf2..b24dab8 100644
--- a/src/application/california-resource.vala
+++ b/src/application/california-resource.vala
@@ -5,21 +5,41 @@
  */
 
 /**
- * Utility methods to facilitiate loading Resources and converting them into useful objects.
+ * Utility methods to facilitiate loading Resources.
+ *
+ * These methods assume that the resource must be present for proper operation and so treat hard
+ * failures as cause for application termination.
  */
 
 namespace California.Resource {
 
 public const string DEFAULT_PATH = "/org/yorba/california/rc";
 
+private string create_fullpath(string path, string resource) {
+    return "%s%s%s".printf(path, path.has_suffix("/") ? "" : "/", resource);
+}
+
+/**
+ * Loads the resource and returns it as Bytes.
+ */
+public Bytes load_bytes(string resource_name, string path = DEFAULT_PATH) {
+    string fullpath = create_fullpath(path, resource_name);
+    
+    try {
+        return resources_lookup_data(fullpath, ResourceLookupFlags.NONE);
+    } catch (Error err) {
+        error("Unable to load resource %s: %s", fullpath, err.message);
+    }
+}
+
 /**
- * Loads the resource and returns it as a casted object.
+ * Loads the resource, parses it with Gtk.Builder, and returns it as a casted object.
  *
  * Any load error will cause the application to panic.  This generally indicates the resource
  * was not compiled in or that the path is malformed.
  */
-public T load<T>(string resource, string object_name, string path = DEFAULT_PATH) {
-    string fullpath = "%s%s%s".printf(path, path.has_suffix("/") ? "" : "/", resource);
+public T load_object<T>(string resource_name, string object_name, string path = DEFAULT_PATH) {
+    string fullpath = create_fullpath(path, resource_name);
     
     Gtk.Builder builder = new Gtk.Builder();
     try {
diff --git a/src/calendar/calendar-olson-zone.vala b/src/calendar/calendar-olson-zone.vala
index e97d04d..c247541 100644
--- a/src/calendar/calendar-olson-zone.vala
+++ b/src/calendar/calendar-olson-zone.vala
@@ -12,8 +12,8 @@ namespace California.Calendar {
  * An Olson name is in the form of "Area/Location".  This class merely encapsulates this string
  * and gives it some type-ness; actual time zone calculations is left to { link Timezone}.
  * In particular, little error-checking is performed by this class.  It also does no processing
- * or consideration for zone aliases ("links"), which is why it does not implement Gee.Hashable or
- * Gee.Comparable.
+ * or consideration for zone aliases ("links").  It is Gee.Hashable, but that is purely based on
+ * string comparisons with no other logic involved.
  *
  * This class is immutable.
  *
@@ -22,9 +22,11 @@ namespace California.Calendar {
  *
  * The IANA database of Olson zones and related information is located at
  * [[https://www.iana.org/time-zones]]
+ *
+ * @see WindowsZone
  */
 
-public class OlsonZone : BaseObject {
+public class OlsonZone : BaseObject, Gee.Hashable<OlsonZone> {
     /**
      * The string value this class uses if an empty string is passed to the constructor.
      *
@@ -46,16 +48,111 @@ public class OlsonZone : BaseObject {
      */
     public string value { get; private set; }
     
+    private static Gee.HashMap<string, OlsonZone>? windows_to_olson = null;
+    
     public OlsonZone(string area_location) {
-        value = !String.is_empty(area_location) ? area_location : UTC;
+        string stripped = area_location.strip();
+        value = !String.is_empty(stripped) ? stripped : UTC;
     }
     
     internal static void init() {
         utc = new OlsonZone(UTC);
     }
     
+    // Load Windows -> Olson conversion table
+    internal static void load_conversions() throws Error {
+        windows_to_olson = new Gee.HashMap<string, OlsonZone>(String.stri_hash, String.stri_equal);
+        
+        // to conserve resident objects, as these will stick around the lifetime of the application
+        Gee.HashMap<string, OlsonZone> name_to_olson = new Gee.HashMap<string, OlsonZone>(
+            String.stri_hash, String.stri_equal);
+        
+        // Yes, we should be doing this with a proper XML DOM library, but (a) libxml2 is kind of
+        // messy to work with, (b) it doesn't guarantee to be compiled with XPath support, which
+        // would sure make our lives easier here, and (c) we're in complete control of the data being
+        // parsed, and so XML validation and correct traversal is less important
+        char[] windows_buf = new char[4096];
+        char[] territory_buf = new char[4096];
+        char[] olson_buf = new char[4096];
+        DataInputStream dins = new DataInputStream(
+            new MemoryInputStream.from_bytes(Resource.load_bytes("windowsZones.xml")));
+        dins.set_newline_type(DataStreamNewlineType.ANY);
+        for (;;) {
+            string? line = dins.read_line();
+            if (line == null)
+                break;
+            
+            line = line.strip();
+            if (String.is_empty(line))
+                continue;
+            
+            // Note that the width specifier matches the size of the character arrays above
+            int count = line.scanf("<mapZone other=\"%4096[^\"]\" territory=\"%4096[^\"]\" 
type=\"%4096[^\"]\"/>",
+                windows_buf, territory_buf, olson_buf);
+            if (count != 3)
+                continue;
+            
+            // only interested in territory "001", the primary territory, which is how the conversion
+            // is made
+            string territory = ((string) territory_buf).strip();
+            if (territory != "001")
+                continue;
+            
+            string windows = ((string) windows_buf).strip();
+            assert(!String.is_empty(windows));
+            
+            string olson = ((string) olson_buf).strip();
+            assert(!String.is_empty(olson));
+            
+            // unlike other entries, 001 is always a single Olson code, otherwise the value would
+            // need to be tokenized
+            assert(!olson.contains(" "));
+            
+            // conserve Olson zone objects (one can be assigned to many Windows zone names)
+            OlsonZone? olson_zone = name_to_olson.get(olson);
+            if (olson_zone == null) {
+                olson_zone = new OlsonZone(olson);
+                name_to_olson.set(olson_zone.value, olson_zone);
+            }
+            
+            assert(!windows_to_olson.has_key(windows));
+            windows_to_olson.set(windows, olson_zone);
+        }
+    }
+    
     internal static void terminate() {
         utc = null;
+        windows_to_olson = null;
+    }
+    
+    /**
+     * Returns the { link OlsonZone}, if any, for a Windows zone name.
+     *
+     * Windows time zone names tend to be a single descriptive string, such as "Pacific Standard Time".
+     * There are often variations of the same time zone with different names depending on political
+     * and national bounaries.  They are always transmitted in English.
+     *
+     * For more information, see
+     * [[http://technet.microsoft.com/en-us/library/cc749073%28v=ws.10%29.aspx]]
+     */
+    public OlsonZone? for_windows_zone(string name) {
+        assert(windows_to_olson != null);
+        
+        return windows_to_olson.get(name.strip());
+    }
+    
+    /**
+     * See the class notes for stipulations about object equality.
+     */
+    public uint hash() {
+        return String.stri_hash(value);
+    }
+    
+    /**
+     * See the class notes for stipulations about object equality.
+     */
+    public bool equal_to(OlsonZone other) {
+        return (this != other) ? String.stri_equal(value, other.value) : true;
     }
     
     public override string to_string() {
diff --git a/src/calendar/calendar.vala b/src/calendar/calendar.vala
index cafb6cb..83d466c 100644
--- a/src/calendar/calendar.vala
+++ b/src/calendar/calendar.vala
@@ -19,25 +19,25 @@ namespace California.Calendar {
 
 private int init_count = 0;
 
-private static unowned string FMT_MONTH_YEAR_FULL;
-private static unowned string FMT_MONTH_YEAR_ABBREV;
-private static unowned string FMT_MONTH_FULL;
-private static unowned string FMT_MONTH_ABBREV;
-private static unowned string FMT_DAY_OF_WEEK_FULL;
-private static unowned string FMT_DAY_OF_WEEK_ABBREV;
-private static unowned string FMT_FULL_DATE;
-private static unowned string FMT_PRETTY_DATE;
-private static unowned string FMT_PRETTY_DATE_NO_YEAR;
-private static unowned string FMT_PRETTY_DATE_ABBREV;
-private static unowned string FMT_PRETTY_DATE_ABBREV_NO_YEAR;
-private static unowned string FMT_AM;
-private static unowned string FMT_BRIEF_AM;
-private static unowned string FMT_PM;
-private static unowned string FMT_BRIEF_PM;
-private static unowned string FMT_12HOUR_MIN_MERIDIEM;
-private static unowned string FMT_12HOUR_MIN_SEC_MERIDIEM;
-private static unowned string FMT_24HOUR_MIN;
-private static unowned string FMT_24HOUR_MIN_SEC;
+private unowned string FMT_MONTH_YEAR_FULL;
+private unowned string FMT_MONTH_YEAR_ABBREV;
+private unowned string FMT_MONTH_FULL;
+private unowned string FMT_MONTH_ABBREV;
+private unowned string FMT_DAY_OF_WEEK_FULL;
+private unowned string FMT_DAY_OF_WEEK_ABBREV;
+private unowned string FMT_FULL_DATE;
+private unowned string FMT_PRETTY_DATE;
+private unowned string FMT_PRETTY_DATE_NO_YEAR;
+private unowned string FMT_PRETTY_DATE_ABBREV;
+private unowned string FMT_PRETTY_DATE_ABBREV_NO_YEAR;
+private unowned string FMT_AM;
+private unowned string FMT_BRIEF_AM;
+private unowned string FMT_PM;
+private unowned string FMT_BRIEF_PM;
+private unowned string FMT_12HOUR_MIN_MERIDIEM;
+private unowned string FMT_12HOUR_MIN_SEC_MERIDIEM;
+private unowned string FMT_24HOUR_MIN;
+private unowned string FMT_24HOUR_MIN_SEC;
 
 public void init() throws Error {
     if (!California.Unit.do_init(ref init_count))
@@ -149,6 +149,9 @@ public void init() throws Error {
     WallTime.init();
     System.init();
     Timezone.init();
+    
+    // this needs to be peformed after the rest of the namespace is initialized
+    OlsonZone.load_conversions();
 }
 
 public void terminate() {
diff --git a/src/california-resources.xml b/src/california-resources.xml
index 03bb412..ccdfd31 100644
--- a/src/california-resources.xml
+++ b/src/california-resources.xml
@@ -36,5 +36,8 @@
     <gresource prefix="/org/yorba/california">
         <file compressed="true">rc/webcal-subscribe.ui</file>
     </gresource>
+    <gresource prefix="/org/yorba/california">
+        <file compressed="true">rc/windowsZones.xml</file>
+    </gresource>
 </gresources>
 
diff --git a/src/rc/windowsZones.xml b/src/rc/windowsZones.xml
new file mode 100644
index 0000000..f7caba7
--- /dev/null
+++ b/src/rc/windowsZones.xml
@@ -0,0 +1,653 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE supplementalData SYSTEM "../../common/dtd/ldmlSupplemental.dtd">
+<!--
+Copyright © 1991-2013 Unicode, Inc.
+CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/)
+For terms of use, see http://www.unicode.org/copyright.html
+-->
+
+<supplementalData>
+       <version number="$Revision$"/>
+       <generation date="$Date$"/>
+
+       <windowsZones>
+               <mapTimezones otherVersion="7de0000" typeVersion="2014b">
+
+                       <!-- (UTC-12:00) International Date Line West -->
+                       <mapZone other="Dateline Standard Time" territory="001" type="Etc/GMT+12"/>
+                       <mapZone other="Dateline Standard Time" territory="ZZ" type="Etc/GMT+12"/>
+
+                       <!-- (UTC-11:00) Coordinated Universal Time-11 -->
+                       <mapZone other="UTC-11" territory="001" type="Etc/GMT+11"/>
+                       <mapZone other="UTC-11" territory="AS" type="Pacific/Pago_Pago"/>
+                       <mapZone other="UTC-11" territory="NU" type="Pacific/Niue"/>
+                       <mapZone other="UTC-11" territory="UM" type="Pacific/Midway"/>
+                       <mapZone other="UTC-11" territory="ZZ" type="Etc/GMT+11"/>
+
+                       <!-- (UTC-10:00) Hawaii -->
+                       <mapZone other="Hawaiian Standard Time" territory="001" type="Pacific/Honolulu"/>
+                       <mapZone other="Hawaiian Standard Time" territory="CK" type="Pacific/Rarotonga"/>
+                       <mapZone other="Hawaiian Standard Time" territory="PF" type="Pacific/Tahiti"/>
+                       <mapZone other="Hawaiian Standard Time" territory="UM" type="Pacific/Johnston"/>
+                       <mapZone other="Hawaiian Standard Time" territory="US" type="Pacific/Honolulu"/>
+                       <mapZone other="Hawaiian Standard Time" territory="ZZ" type="Etc/GMT+10"/>
+
+                       <!-- (UTC-09:00) Alaska -->
+                       <mapZone other="Alaskan Standard Time" territory="001" type="America/Anchorage"/>
+                       <mapZone other="Alaskan Standard Time" territory="US" type="America/Anchorage 
America/Juneau America/Nome America/Sitka America/Yakutat"/>
+
+                       <!-- (UTC-08:00) Baja California -->
+                       <mapZone other="Pacific Standard Time (Mexico)" territory="001" 
type="America/Santa_Isabel"/>
+                       <mapZone other="Pacific Standard Time (Mexico)" territory="MX" 
type="America/Santa_Isabel"/>
+
+                       <!-- (UTC-08:00) Pacific Time (US & Canada) -->
+                       <mapZone other="Pacific Standard Time" territory="001" type="America/Los_Angeles"/>
+                       <mapZone other="Pacific Standard Time" territory="CA" type="America/Vancouver 
America/Dawson America/Whitehorse"/>
+                       <mapZone other="Pacific Standard Time" territory="MX" type="America/Tijuana"/>
+                       <mapZone other="Pacific Standard Time" territory="US" type="America/Los_Angeles"/>
+                       <mapZone other="Pacific Standard Time" territory="ZZ" type="PST8PDT"/>
+
+                       <!-- (UTC-07:00) Arizona -->
+                       <mapZone other="US Mountain Standard Time" territory="001" type="America/Phoenix"/>
+                       <mapZone other="US Mountain Standard Time" territory="CA" type="America/Dawson_Creek 
America/Creston"/>
+                       <mapZone other="US Mountain Standard Time" territory="MX" type="America/Hermosillo"/>
+                       <mapZone other="US Mountain Standard Time" territory="US" type="America/Phoenix"/>
+                       <mapZone other="US Mountain Standard Time" territory="ZZ" type="Etc/GMT+7"/>
+
+                       <!-- (UTC-07:00) Chihuahua, La Paz, Mazatlan -->
+                       <mapZone other="Mountain Standard Time (Mexico)" territory="001" 
type="America/Chihuahua"/>
+                       <mapZone other="Mountain Standard Time (Mexico)" territory="MX" 
type="America/Chihuahua America/Mazatlan"/>
+
+                       <!-- (UTC-07:00) Mountain Time (US & Canada) -->
+                       <mapZone other="Mountain Standard Time" territory="001" type="America/Denver"/>
+                       <mapZone other="Mountain Standard Time" territory="CA" type="America/Edmonton 
America/Cambridge_Bay America/Inuvik America/Yellowknife"/>
+                       <mapZone other="Mountain Standard Time" territory="MX" type="America/Ojinaga"/>
+                       <mapZone other="Mountain Standard Time" territory="US" type="America/Denver 
America/Boise"/>
+                       <mapZone other="Mountain Standard Time" territory="ZZ" type="MST7MDT"/>
+
+                       <!-- (UTC-06:00) Central America -->
+                       <mapZone other="Central America Standard Time" territory="001" 
type="America/Guatemala"/>
+                       <mapZone other="Central America Standard Time" territory="BZ" type="America/Belize"/>
+                       <mapZone other="Central America Standard Time" territory="CR" 
type="America/Costa_Rica"/>
+                       <mapZone other="Central America Standard Time" territory="EC" 
type="Pacific/Galapagos"/>
+                       <mapZone other="Central America Standard Time" territory="GT" 
type="America/Guatemala"/>
+                       <mapZone other="Central America Standard Time" territory="HN" 
type="America/Tegucigalpa"/>
+                       <mapZone other="Central America Standard Time" territory="NI" type="America/Managua"/>
+                       <mapZone other="Central America Standard Time" territory="SV" 
type="America/El_Salvador"/>
+                       <mapZone other="Central America Standard Time" territory="ZZ" type="Etc/GMT+6"/>
+
+                       <!-- (UTC-06:00) Central Time (US & Canada) -->
+                       <mapZone other="Central Standard Time" territory="001" type="America/Chicago"/>
+                       <mapZone other="Central Standard Time" territory="CA" type="America/Winnipeg 
America/Rainy_River America/Rankin_Inlet America/Resolute"/>
+                       <mapZone other="Central Standard Time" territory="MX" type="America/Matamoros"/>
+                       <mapZone other="Central Standard Time" territory="US" type="America/Chicago 
America/Indiana/Knox America/Indiana/Tell_City America/Menominee America/North_Dakota/Beulah 
America/North_Dakota/Center America/North_Dakota/New_Salem"/>
+                       <mapZone other="Central Standard Time" territory="ZZ" type="CST6CDT"/>
+
+                       <!-- (UTC-06:00) Guadalajara, Mexico City, Monterrey -->
+                       <mapZone other="Central Standard Time (Mexico)" territory="001" 
type="America/Mexico_City"/>
+                       <mapZone other="Central Standard Time (Mexico)" territory="MX" 
type="America/Mexico_City America/Bahia_Banderas America/Cancun America/Merida America/Monterrey"/>
+
+                       <!-- (UTC-06:00) Saskatchewan -->
+                       <mapZone other="Canada Central Standard Time" territory="001" type="America/Regina"/>
+                       <mapZone other="Canada Central Standard Time" territory="CA" type="America/Regina 
America/Swift_Current"/>
+
+                       <!-- (UTC-05:00) Bogota, Lima, Quito -->
+                       <mapZone other="SA Pacific Standard Time" territory="001" type="America/Bogota"/>
+                       <mapZone other="SA Pacific Standard Time" territory="BR" type="America/Rio_Branco 
America/Eirunepe"/>
+                       <mapZone other="SA Pacific Standard Time" territory="CA" 
type="America/Coral_Harbour"/>
+                       <mapZone other="SA Pacific Standard Time" territory="CO" type="America/Bogota"/>
+                       <mapZone other="SA Pacific Standard Time" territory="EC" type="America/Guayaquil"/>
+                       <mapZone other="SA Pacific Standard Time" territory="JM" type="America/Jamaica"/>
+                       <mapZone other="SA Pacific Standard Time" territory="KY" type="America/Cayman"/>
+                       <mapZone other="SA Pacific Standard Time" territory="PA" type="America/Panama"/>
+                       <mapZone other="SA Pacific Standard Time" territory="PE" type="America/Lima"/>
+                       <mapZone other="SA Pacific Standard Time" territory="ZZ" type="Etc/GMT+5"/>
+
+                       <!-- (UTC-05:00) Eastern Time (US & Canada) -->
+                       <mapZone other="Eastern Standard Time" territory="001" type="America/New_York"/>
+                       <mapZone other="Eastern Standard Time" territory="BS" type="America/Nassau"/>
+                       <mapZone other="Eastern Standard Time" territory="CA" type="America/Toronto 
America/Iqaluit America/Montreal America/Nipigon America/Pangnirtung America/Thunder_Bay"/>
+                       <mapZone other="Eastern Standard Time" territory="CU" type="America/Havana"/>
+                       <mapZone other="Eastern Standard Time" territory="HT" type="America/Port-au-Prince"/>
+                       <mapZone other="Eastern Standard Time" territory="TC" type="America/Grand_Turk"/>
+                       <mapZone other="Eastern Standard Time" territory="US" type="America/New_York 
America/Detroit America/Indiana/Petersburg America/Indiana/Vincennes America/Indiana/Winamac 
America/Kentucky/Monticello America/Louisville"/>
+                       <mapZone other="Eastern Standard Time" territory="ZZ" type="EST5EDT"/>
+
+                       <!-- (UTC-05:00) Indiana (East) -->
+                       <mapZone other="US Eastern Standard Time" territory="001" 
type="America/Indianapolis"/>
+                       <mapZone other="US Eastern Standard Time" territory="US" type="America/Indianapolis 
America/Indiana/Marengo America/Indiana/Vevay"/>
+
+                       <!-- (UTC-04:30) Caracas -->
+                       <mapZone other="Venezuela Standard Time" territory="001" type="America/Caracas"/>
+                       <mapZone other="Venezuela Standard Time" territory="VE" type="America/Caracas"/>
+
+                       <!-- (UTC-04:00) Asuncion -->
+                       <mapZone other="Paraguay Standard Time" territory="001" type="America/Asuncion"/>
+                       <mapZone other="Paraguay Standard Time" territory="PY" type="America/Asuncion"/>
+
+                       <!-- (UTC-04:00) Atlantic Time (Canada) -->
+                       <mapZone other="Atlantic Standard Time" territory="001" type="America/Halifax"/>
+                       <mapZone other="Atlantic Standard Time" territory="BM" type="Atlantic/Bermuda"/>
+                       <mapZone other="Atlantic Standard Time" territory="CA" type="America/Halifax 
America/Glace_Bay America/Goose_Bay America/Moncton"/>
+                       <mapZone other="Atlantic Standard Time" territory="GL" type="America/Thule"/>
+
+                       <!-- (UTC-04:00) Cuiaba -->
+                       <mapZone other="Central Brazilian Standard Time" territory="001" 
type="America/Cuiaba"/>
+                       <mapZone other="Central Brazilian Standard Time" territory="BR" type="America/Cuiaba 
America/Campo_Grande"/>
+
+                       <!-- (UTC-04:00) Georgetown, La Paz, Manaus, San Juan -->
+                       <mapZone other="SA Western Standard Time" territory="001" type="America/La_Paz"/>
+                       <mapZone other="SA Western Standard Time" territory="AG" type="America/Antigua"/>
+                       <mapZone other="SA Western Standard Time" territory="AI" type="America/Anguilla"/>
+                       <mapZone other="SA Western Standard Time" territory="AW" type="America/Aruba"/>
+                       <mapZone other="SA Western Standard Time" territory="BB" type="America/Barbados"/>
+                       <mapZone other="SA Western Standard Time" territory="BL" 
type="America/St_Barthelemy"/>
+                       <mapZone other="SA Western Standard Time" territory="BO" type="America/La_Paz"/>
+                       <mapZone other="SA Western Standard Time" territory="BQ" type="America/Kralendijk"/>
+                       <mapZone other="SA Western Standard Time" territory="BR" type="America/Manaus 
America/Boa_Vista America/Porto_Velho"/>
+                       <mapZone other="SA Western Standard Time" territory="CA" type="America/Blanc-Sablon"/>
+                       <mapZone other="SA Western Standard Time" territory="CW" type="America/Curacao"/>
+                       <mapZone other="SA Western Standard Time" territory="DM" type="America/Dominica"/>
+                       <mapZone other="SA Western Standard Time" territory="DO" 
type="America/Santo_Domingo"/>
+                       <mapZone other="SA Western Standard Time" territory="GD" type="America/Grenada"/>
+                       <mapZone other="SA Western Standard Time" territory="GP" type="America/Guadeloupe"/>
+                       <mapZone other="SA Western Standard Time" territory="GY" type="America/Guyana"/>
+                       <mapZone other="SA Western Standard Time" territory="KN" type="America/St_Kitts"/>
+                       <mapZone other="SA Western Standard Time" territory="LC" type="America/St_Lucia"/>
+                       <mapZone other="SA Western Standard Time" territory="MF" type="America/Marigot"/>
+                       <mapZone other="SA Western Standard Time" territory="MQ" type="America/Martinique"/>
+                       <mapZone other="SA Western Standard Time" territory="MS" type="America/Montserrat"/>
+                       <mapZone other="SA Western Standard Time" territory="PR" type="America/Puerto_Rico"/>
+                       <mapZone other="SA Western Standard Time" territory="SX" 
type="America/Lower_Princes"/>
+                       <mapZone other="SA Western Standard Time" territory="TT" 
type="America/Port_of_Spain"/>
+                       <mapZone other="SA Western Standard Time" territory="VC" type="America/St_Vincent"/>
+                       <mapZone other="SA Western Standard Time" territory="VG" type="America/Tortola"/>
+                       <mapZone other="SA Western Standard Time" territory="VI" type="America/St_Thomas"/>
+                       <mapZone other="SA Western Standard Time" territory="ZZ" type="Etc/GMT+4"/>
+
+                       <!-- (UTC-04:00) Santiago -->
+                       <mapZone other="Pacific SA Standard Time" territory="001" type="America/Santiago"/>
+                       <mapZone other="Pacific SA Standard Time" territory="AQ" type="Antarctica/Palmer"/>
+                       <mapZone other="Pacific SA Standard Time" territory="CL" type="America/Santiago"/>
+
+                       <!-- (UTC-03:30) Newfoundland -->
+                       <mapZone other="Newfoundland Standard Time" territory="001" type="America/St_Johns"/>
+                       <mapZone other="Newfoundland Standard Time" territory="CA" type="America/St_Johns"/>
+
+                       <!-- (UTC-03:00) Brasilia -->
+                       <mapZone other="E. South America Standard Time" territory="001" 
type="America/Sao_Paulo"/>
+                       <mapZone other="E. South America Standard Time" territory="BR" 
type="America/Sao_Paulo"/>
+
+                       <!-- (UTC-03:00) Buenos Aires -->
+                       <mapZone other="Argentina Standard Time" territory="001" type="America/Buenos_Aires"/>
+                       <mapZone other="Argentina Standard Time" territory="AR" type="America/Buenos_Aires 
America/Argentina/La_Rioja America/Argentina/Rio_Gallegos America/Argentina/Salta America/Argentina/San_Juan 
America/Argentina/San_Luis America/Argentina/Tucuman America/Argentina/Ushuaia America/Catamarca 
America/Cordoba America/Jujuy America/Mendoza"/>
+
+                       <!-- (UTC-03:00) Cayenne, Fortaleza -->
+                       <mapZone other="SA Eastern Standard Time" territory="001" type="America/Cayenne"/>
+                       <mapZone other="SA Eastern Standard Time" territory="AQ" type="Antarctica/Rothera"/>
+                       <mapZone other="SA Eastern Standard Time" territory="BR" type="America/Fortaleza 
America/Araguaina America/Belem America/Maceio America/Recife America/Santarem"/>
+                       <mapZone other="SA Eastern Standard Time" territory="FK" type="Atlantic/Stanley"/>
+                       <mapZone other="SA Eastern Standard Time" territory="GF" type="America/Cayenne"/>
+                       <mapZone other="SA Eastern Standard Time" territory="SR" type="America/Paramaribo"/>
+                       <mapZone other="SA Eastern Standard Time" territory="ZZ" type="Etc/GMT+3"/>
+
+                       <!-- (UTC-03:00) Greenland -->
+                       <mapZone other="Greenland Standard Time" territory="001" type="America/Godthab"/>
+                       <mapZone other="Greenland Standard Time" territory="GL" type="America/Godthab"/>
+
+                       <!-- (UTC-03:00) Montevideo -->
+                       <mapZone other="Montevideo Standard Time" territory="001" type="America/Montevideo"/>
+                       <mapZone other="Montevideo Standard Time" territory="UY" type="America/Montevideo"/>
+
+                       <!-- (UTC-03:00) Salvador -->
+                       <mapZone other="Bahia Standard Time" territory="001" type="America/Bahia"/>
+                       <mapZone other="Bahia Standard Time" territory="BR" type="America/Bahia"/>
+
+                       <!-- (UTC-02:00) Coordinated Universal Time-02 -->
+                       <mapZone other="UTC-02" territory="001" type="Etc/GMT+2"/>
+                       <mapZone other="UTC-02" territory="BR" type="America/Noronha"/>
+                       <mapZone other="UTC-02" territory="GS" type="Atlantic/South_Georgia"/>
+                       <mapZone other="UTC-02" territory="ZZ" type="Etc/GMT+2"/>
+
+                       <!-- (UTC-01:00) Azores -->
+                       <mapZone other="Azores Standard Time" territory="001" type="Atlantic/Azores"/>
+                       <mapZone other="Azores Standard Time" territory="GL" type="America/Scoresbysund"/>
+                       <mapZone other="Azores Standard Time" territory="PT" type="Atlantic/Azores"/>
+
+                       <!-- (UTC-01:00) Cape Verde Is. -->
+                       <mapZone other="Cape Verde Standard Time" territory="001" type="Atlantic/Cape_Verde"/>
+                       <mapZone other="Cape Verde Standard Time" territory="CV" type="Atlantic/Cape_Verde"/>
+                       <mapZone other="Cape Verde Standard Time" territory="ZZ" type="Etc/GMT+1"/>
+
+                       <!-- (UTC) Casablanca -->
+                       <mapZone other="Morocco Standard Time" territory="001" type="Africa/Casablanca"/>
+                       <mapZone other="Morocco Standard Time" territory="EH" type="Africa/El_Aaiun"/>
+                       <mapZone other="Morocco Standard Time" territory="MA" type="Africa/Casablanca"/>
+
+                       <!-- (UTC) Coordinated Universal Time -->
+                       <mapZone other="UTC" territory="001" type="Etc/GMT"/>
+                       <mapZone other="UTC" territory="GL" type="America/Danmarkshavn"/>
+                       <mapZone other="UTC" territory="ZZ" type="Etc/GMT"/>
+
+                       <!-- (UTC) Dublin, Edinburgh, Lisbon, London -->
+                       <mapZone other="GMT Standard Time" territory="001" type="Europe/London"/>
+                       <mapZone other="GMT Standard Time" territory="ES" type="Atlantic/Canary"/>
+                       <mapZone other="GMT Standard Time" territory="FO" type="Atlantic/Faeroe"/>
+                       <mapZone other="GMT Standard Time" territory="GB" type="Europe/London"/>
+                       <mapZone other="GMT Standard Time" territory="GG" type="Europe/Guernsey"/>
+                       <mapZone other="GMT Standard Time" territory="IE" type="Europe/Dublin"/>
+                       <mapZone other="GMT Standard Time" territory="IM" type="Europe/Isle_of_Man"/>
+                       <mapZone other="GMT Standard Time" territory="JE" type="Europe/Jersey"/>
+                       <mapZone other="GMT Standard Time" territory="PT" type="Europe/Lisbon 
Atlantic/Madeira"/>
+
+                       <!-- (UTC) Monrovia, Reykjavik -->
+                       <mapZone other="Greenwich Standard Time" territory="001" type="Atlantic/Reykjavik"/>
+                       <mapZone other="Greenwich Standard Time" territory="BF" type="Africa/Ouagadougou"/>
+                       <mapZone other="Greenwich Standard Time" territory="CI" type="Africa/Abidjan"/>
+                       <mapZone other="Greenwich Standard Time" territory="GH" type="Africa/Accra"/>
+                       <mapZone other="Greenwich Standard Time" territory="GM" type="Africa/Banjul"/>
+                       <mapZone other="Greenwich Standard Time" territory="GN" type="Africa/Conakry"/>
+                       <mapZone other="Greenwich Standard Time" territory="GW" type="Africa/Bissau"/>
+                       <mapZone other="Greenwich Standard Time" territory="IS" type="Atlantic/Reykjavik"/>
+                       <mapZone other="Greenwich Standard Time" territory="LR" type="Africa/Monrovia"/>
+                       <mapZone other="Greenwich Standard Time" territory="ML" type="Africa/Bamako"/>
+                       <mapZone other="Greenwich Standard Time" territory="MR" type="Africa/Nouakchott"/>
+                       <mapZone other="Greenwich Standard Time" territory="SH" type="Atlantic/St_Helena"/>
+                       <mapZone other="Greenwich Standard Time" territory="SL" type="Africa/Freetown"/>
+                       <mapZone other="Greenwich Standard Time" territory="SN" type="Africa/Dakar"/>
+                       <mapZone other="Greenwich Standard Time" territory="ST" type="Africa/Sao_Tome"/>
+                       <mapZone other="Greenwich Standard Time" territory="TG" type="Africa/Lome"/>
+
+                       <!-- (UTC+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna -->
+                       <mapZone other="W. Europe Standard Time" territory="001" type="Europe/Berlin"/>
+                       <mapZone other="W. Europe Standard Time" territory="AD" type="Europe/Andorra"/>
+                       <mapZone other="W. Europe Standard Time" territory="AT" type="Europe/Vienna"/>
+                       <mapZone other="W. Europe Standard Time" territory="CH" type="Europe/Zurich"/>
+                       <mapZone other="W. Europe Standard Time" territory="DE" type="Europe/Berlin 
Europe/Busingen"/>
+                       <mapZone other="W. Europe Standard Time" territory="GI" type="Europe/Gibraltar"/>
+                       <mapZone other="W. Europe Standard Time" territory="IT" type="Europe/Rome"/>
+                       <mapZone other="W. Europe Standard Time" territory="LI" type="Europe/Vaduz"/>
+                       <mapZone other="W. Europe Standard Time" territory="LU" type="Europe/Luxembourg"/>
+                       <mapZone other="W. Europe Standard Time" territory="MC" type="Europe/Monaco"/>
+                       <mapZone other="W. Europe Standard Time" territory="MT" type="Europe/Malta"/>
+                       <mapZone other="W. Europe Standard Time" territory="NL" type="Europe/Amsterdam"/>
+                       <mapZone other="W. Europe Standard Time" territory="NO" type="Europe/Oslo"/>
+                       <mapZone other="W. Europe Standard Time" territory="SE" type="Europe/Stockholm"/>
+                       <mapZone other="W. Europe Standard Time" territory="SJ" type="Arctic/Longyearbyen"/>
+                       <mapZone other="W. Europe Standard Time" territory="SM" type="Europe/San_Marino"/>
+                       <mapZone other="W. Europe Standard Time" territory="VA" type="Europe/Vatican"/>
+
+                       <!-- (UTC+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague -->
+                       <mapZone other="Central Europe Standard Time" territory="001" type="Europe/Budapest"/>
+                       <mapZone other="Central Europe Standard Time" territory="AL" type="Europe/Tirane"/>
+                       <mapZone other="Central Europe Standard Time" territory="CZ" type="Europe/Prague"/>
+                       <mapZone other="Central Europe Standard Time" territory="HU" type="Europe/Budapest"/>
+                       <mapZone other="Central Europe Standard Time" territory="ME" type="Europe/Podgorica"/>
+                       <mapZone other="Central Europe Standard Time" territory="RS" type="Europe/Belgrade"/>
+                       <mapZone other="Central Europe Standard Time" territory="SI" type="Europe/Ljubljana"/>
+                       <mapZone other="Central Europe Standard Time" territory="SK" 
type="Europe/Bratislava"/>
+
+                       <!-- (UTC+01:00) Brussels, Copenhagen, Madrid, Paris -->
+                       <mapZone other="Romance Standard Time" territory="001" type="Europe/Paris"/>
+                       <mapZone other="Romance Standard Time" territory="BE" type="Europe/Brussels"/>
+                       <mapZone other="Romance Standard Time" territory="DK" type="Europe/Copenhagen"/>
+                       <mapZone other="Romance Standard Time" territory="ES" type="Europe/Madrid 
Africa/Ceuta"/>
+                       <mapZone other="Romance Standard Time" territory="FR" type="Europe/Paris"/>
+
+                       <!-- (UTC+01:00) Sarajevo, Skopje, Warsaw, Zagreb -->
+                       <mapZone other="Central European Standard Time" territory="001" type="Europe/Warsaw"/>
+                       <mapZone other="Central European Standard Time" territory="BA" 
type="Europe/Sarajevo"/>
+                       <mapZone other="Central European Standard Time" territory="HR" type="Europe/Zagreb"/>
+                       <mapZone other="Central European Standard Time" territory="MK" type="Europe/Skopje"/>
+                       <mapZone other="Central European Standard Time" territory="PL" type="Europe/Warsaw"/>
+
+                       <!-- (UTC+01:00) West Central Africa -->
+                       <mapZone other="W. Central Africa Standard Time" territory="001" type="Africa/Lagos"/>
+                       <mapZone other="W. Central Africa Standard Time" territory="AO" type="Africa/Luanda"/>
+                       <mapZone other="W. Central Africa Standard Time" territory="BJ" 
type="Africa/Porto-Novo"/>
+                       <mapZone other="W. Central Africa Standard Time" territory="CD" 
type="Africa/Kinshasa"/>
+                       <mapZone other="W. Central Africa Standard Time" territory="CF" type="Africa/Bangui"/>
+                       <mapZone other="W. Central Africa Standard Time" territory="CG" 
type="Africa/Brazzaville"/>
+                       <mapZone other="W. Central Africa Standard Time" territory="CM" type="Africa/Douala"/>
+                       <mapZone other="W. Central Africa Standard Time" territory="DZ" 
type="Africa/Algiers"/>
+                       <mapZone other="W. Central Africa Standard Time" territory="GA" 
type="Africa/Libreville"/>
+                       <mapZone other="W. Central Africa Standard Time" territory="GQ" type="Africa/Malabo"/>
+                       <mapZone other="W. Central Africa Standard Time" territory="NE" type="Africa/Niamey"/>
+                       <mapZone other="W. Central Africa Standard Time" territory="NG" type="Africa/Lagos"/>
+                       <mapZone other="W. Central Africa Standard Time" territory="TD" 
type="Africa/Ndjamena"/>
+                       <mapZone other="W. Central Africa Standard Time" territory="TN" type="Africa/Tunis"/>
+                       <mapZone other="W. Central Africa Standard Time" territory="ZZ" type="Etc/GMT-1"/>
+
+                       <!-- (UTC+01:00) Windhoek -->
+                       <mapZone other="Namibia Standard Time" territory="001" type="Africa/Windhoek"/>
+                       <mapZone other="Namibia Standard Time" territory="NA" type="Africa/Windhoek"/>
+
+                       <!-- (UTC+02:00) Athens, Bucharest -->
+                       <mapZone other="GTB Standard Time" territory="001" type="Europe/Bucharest"/>
+                       <mapZone other="GTB Standard Time" territory="CY" type="Asia/Nicosia"/>
+                       <mapZone other="GTB Standard Time" territory="GR" type="Europe/Athens"/>
+                       <mapZone other="GTB Standard Time" territory="MD" type="Europe/Chisinau"/>
+                       <mapZone other="GTB Standard Time" territory="RO" type="Europe/Bucharest"/>
+
+                       <!-- (UTC+02:00) Beirut -->
+                       <mapZone other="Middle East Standard Time" territory="001" type="Asia/Beirut"/>
+                       <mapZone other="Middle East Standard Time" territory="LB" type="Asia/Beirut"/>
+
+                       <!-- (UTC+02:00) Cairo -->
+                       <mapZone other="Egypt Standard Time" territory="001" type="Africa/Cairo"/>
+                       <mapZone other="Egypt Standard Time" territory="EG" type="Africa/Cairo"/>
+
+                       <!-- (UTC+02:00) Damascus -->
+                       <mapZone other="Syria Standard Time" territory="001" type="Asia/Damascus"/>
+                       <mapZone other="Syria Standard Time" territory="SY" type="Asia/Damascus"/>
+
+                       <!-- (UTC+02:00) E. Europe -->
+                       <!-- Unmappable -->
+
+                       <!-- (UTC+02:00) Harare, Pretoria -->
+                       <mapZone other="South Africa Standard Time" territory="001" 
type="Africa/Johannesburg"/>
+                       <mapZone other="South Africa Standard Time" territory="BI" type="Africa/Bujumbura"/>
+                       <mapZone other="South Africa Standard Time" territory="BW" type="Africa/Gaborone"/>
+                       <mapZone other="South Africa Standard Time" territory="CD" type="Africa/Lubumbashi"/>
+                       <mapZone other="South Africa Standard Time" territory="LS" type="Africa/Maseru"/>
+                       <mapZone other="South Africa Standard Time" territory="MW" type="Africa/Blantyre"/>
+                       <mapZone other="South Africa Standard Time" territory="MZ" type="Africa/Maputo"/>
+                       <mapZone other="South Africa Standard Time" territory="RW" type="Africa/Kigali"/>
+                       <mapZone other="South Africa Standard Time" territory="SZ" type="Africa/Mbabane"/>
+                       <mapZone other="South Africa Standard Time" territory="ZA" 
type="Africa/Johannesburg"/>
+                       <mapZone other="South Africa Standard Time" territory="ZM" type="Africa/Lusaka"/>
+                       <mapZone other="South Africa Standard Time" territory="ZW" type="Africa/Harare"/>
+                       <mapZone other="South Africa Standard Time" territory="ZZ" type="Etc/GMT-2"/>
+
+                       <!-- (UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius -->
+                       <mapZone other="FLE Standard Time" territory="001" type="Europe/Kiev"/>
+                       <mapZone other="FLE Standard Time" territory="AX" type="Europe/Mariehamn"/>
+                       <mapZone other="FLE Standard Time" territory="BG" type="Europe/Sofia"/>
+                       <mapZone other="FLE Standard Time" territory="EE" type="Europe/Tallinn"/>
+                       <mapZone other="FLE Standard Time" territory="FI" type="Europe/Helsinki"/>
+                       <mapZone other="FLE Standard Time" territory="LT" type="Europe/Vilnius"/>
+                       <mapZone other="FLE Standard Time" territory="LV" type="Europe/Riga"/>
+                       <mapZone other="FLE Standard Time" territory="UA" type="Europe/Kiev Europe/Uzhgorod 
Europe/Zaporozhye"/>
+
+                       <!-- (UTC+02:00) Istanbul -->
+                       <mapZone other="Turkey Standard Time" territory="001" type="Europe/Istanbul"/>
+                       <mapZone other="Turkey Standard Time" territory="TR" type="Europe/Istanbul"/>
+
+                       <!-- (UTC+02:00) Jerusalem -->
+                       <mapZone other="Israel Standard Time" territory="001" type="Asia/Jerusalem"/>
+                       <mapZone other="Israel Standard Time" territory="IL" type="Asia/Jerusalem"/>
+
+                       <!-- (UTC+02:00) Tripoli -->
+                       <mapZone other="Libya Standard Time" territory="001" type="Africa/Tripoli"/>
+                       <mapZone other="Libya Standard Time" territory="LY" type="Africa/Tripoli"/>
+
+                       <!-- (UTC+03:00) Amman -->
+                       <mapZone other="Jordan Standard Time" territory="001" type="Asia/Amman"/>
+                       <mapZone other="Jordan Standard Time" territory="JO" type="Asia/Amman"/>
+
+                       <!-- (UTC+03:00) Baghdad -->
+                       <mapZone other="Arabic Standard Time" territory="001" type="Asia/Baghdad"/>
+                       <mapZone other="Arabic Standard Time" territory="IQ" type="Asia/Baghdad"/>
+
+                       <!-- (UTC+03:00) Kaliningrad, Minsk -->
+                       <mapZone other="Kaliningrad Standard Time" territory="001" type="Europe/Kaliningrad"/>
+                       <mapZone other="Kaliningrad Standard Time" territory="BY" type="Europe/Minsk"/>
+                       <mapZone other="Kaliningrad Standard Time" territory="RU" type="Europe/Kaliningrad"/>
+
+                       <!-- (UTC+03:00) Kuwait, Riyadh -->
+                       <mapZone other="Arab Standard Time" territory="001" type="Asia/Riyadh"/>
+                       <mapZone other="Arab Standard Time" territory="BH" type="Asia/Bahrain"/>
+                       <mapZone other="Arab Standard Time" territory="KW" type="Asia/Kuwait"/>
+                       <mapZone other="Arab Standard Time" territory="QA" type="Asia/Qatar"/>
+                       <mapZone other="Arab Standard Time" territory="SA" type="Asia/Riyadh"/>
+                       <mapZone other="Arab Standard Time" territory="YE" type="Asia/Aden"/>
+
+                       <!-- (UTC+03:00) Nairobi -->
+                       <mapZone other="E. Africa Standard Time" territory="001" type="Africa/Nairobi"/>
+                       <mapZone other="E. Africa Standard Time" territory="AQ" type="Antarctica/Syowa"/>
+                       <mapZone other="E. Africa Standard Time" territory="DJ" type="Africa/Djibouti"/>
+                       <mapZone other="E. Africa Standard Time" territory="ER" type="Africa/Asmera"/>
+                       <mapZone other="E. Africa Standard Time" territory="ET" type="Africa/Addis_Ababa"/>
+                       <mapZone other="E. Africa Standard Time" territory="KE" type="Africa/Nairobi"/>
+                       <mapZone other="E. Africa Standard Time" territory="KM" type="Indian/Comoro"/>
+                       <mapZone other="E. Africa Standard Time" territory="MG" type="Indian/Antananarivo"/>
+                       <mapZone other="E. Africa Standard Time" territory="SD" type="Africa/Khartoum"/>
+                       <mapZone other="E. Africa Standard Time" territory="SO" type="Africa/Mogadishu"/>
+                       <mapZone other="E. Africa Standard Time" territory="SS" type="Africa/Juba"/>
+                       <mapZone other="E. Africa Standard Time" territory="TZ" type="Africa/Dar_es_Salaam"/>
+                       <mapZone other="E. Africa Standard Time" territory="UG" type="Africa/Kampala"/>
+                       <mapZone other="E. Africa Standard Time" territory="YT" type="Indian/Mayotte"/>
+                       <mapZone other="E. Africa Standard Time" territory="ZZ" type="Etc/GMT-3"/>
+
+                       <!-- (UTC+03:30) Tehran -->
+                       <mapZone other="Iran Standard Time" territory="001" type="Asia/Tehran"/>
+                       <mapZone other="Iran Standard Time" territory="IR" type="Asia/Tehran"/>
+
+                       <!-- (UTC+04:00) Abu Dhabi, Muscat -->
+                       <mapZone other="Arabian Standard Time" territory="001" type="Asia/Dubai"/>
+                       <mapZone other="Arabian Standard Time" territory="AE" type="Asia/Dubai"/>
+                       <mapZone other="Arabian Standard Time" territory="OM" type="Asia/Muscat"/>
+                       <mapZone other="Arabian Standard Time" territory="ZZ" type="Etc/GMT-4"/>
+
+                       <!-- (UTC+04:00) Baku -->
+                       <mapZone other="Azerbaijan Standard Time" territory="001" type="Asia/Baku"/>
+                       <mapZone other="Azerbaijan Standard Time" territory="AZ" type="Asia/Baku"/>
+
+                       <!-- (UTC+04:00) Moscow, St. Petersburg, Volgograd -->
+                       <mapZone other="Russian Standard Time" territory="001" type="Europe/Moscow"/>
+                       <mapZone other="Russian Standard Time" territory="RU" type="Europe/Moscow 
Europe/Samara Europe/Simferopol Europe/Volgograd"/>
+
+                       <!-- (UTC+04:00) Port Louis -->
+                       <mapZone other="Mauritius Standard Time" territory="001" type="Indian/Mauritius"/>
+                       <mapZone other="Mauritius Standard Time" territory="MU" type="Indian/Mauritius"/>
+                       <mapZone other="Mauritius Standard Time" territory="RE" type="Indian/Reunion"/>
+                       <mapZone other="Mauritius Standard Time" territory="SC" type="Indian/Mahe"/>
+
+                       <!-- (UTC+04:00) Tbilisi -->
+                       <mapZone other="Georgian Standard Time" territory="001" type="Asia/Tbilisi"/>
+                       <mapZone other="Georgian Standard Time" territory="GE" type="Asia/Tbilisi"/>
+
+                       <!-- (UTC+04:00) Yerevan -->
+                       <mapZone other="Caucasus Standard Time" territory="001" type="Asia/Yerevan"/>
+                       <mapZone other="Caucasus Standard Time" territory="AM" type="Asia/Yerevan"/>
+
+                       <!-- (UTC+04:30) Kabul -->
+                       <mapZone other="Afghanistan Standard Time" territory="001" type="Asia/Kabul"/>
+                       <mapZone other="Afghanistan Standard Time" territory="AF" type="Asia/Kabul"/>
+
+                       <!-- (UTC+05:00) Ashgabat, Tashkent -->
+                       <mapZone other="West Asia Standard Time" territory="001" type="Asia/Tashkent"/>
+                       <mapZone other="West Asia Standard Time" territory="AQ" type="Antarctica/Mawson"/>
+                       <mapZone other="West Asia Standard Time" territory="KZ" type="Asia/Oral Asia/Aqtau 
Asia/Aqtobe"/>
+                       <mapZone other="West Asia Standard Time" territory="MV" type="Indian/Maldives"/>
+                       <mapZone other="West Asia Standard Time" territory="TF" type="Indian/Kerguelen"/>
+                       <mapZone other="West Asia Standard Time" territory="TJ" type="Asia/Dushanbe"/>
+                       <mapZone other="West Asia Standard Time" territory="TM" type="Asia/Ashgabat"/>
+                       <mapZone other="West Asia Standard Time" territory="UZ" type="Asia/Tashkent 
Asia/Samarkand"/>
+                       <mapZone other="West Asia Standard Time" territory="ZZ" type="Etc/GMT-5"/>
+
+                       <!-- (UTC+05:00) Islamabad, Karachi -->
+                       <mapZone other="Pakistan Standard Time" territory="001" type="Asia/Karachi"/>
+                       <mapZone other="Pakistan Standard Time" territory="PK" type="Asia/Karachi"/>
+
+                       <!-- (UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi -->
+                       <mapZone other="India Standard Time" territory="001" type="Asia/Calcutta"/>
+                       <mapZone other="India Standard Time" territory="IN" type="Asia/Calcutta"/>
+
+                       <!-- (UTC+05:30) Sri Jayawardenepura -->
+                       <mapZone other="Sri Lanka Standard Time" territory="001" type="Asia/Colombo"/>
+                       <mapZone other="Sri Lanka Standard Time" territory="LK" type="Asia/Colombo"/>
+
+                       <!-- (UTC+05:45) Kathmandu -->
+                       <mapZone other="Nepal Standard Time" territory="001" type="Asia/Katmandu"/>
+                       <mapZone other="Nepal Standard Time" territory="NP" type="Asia/Katmandu"/>
+
+                       <!-- (UTC+06:00) Astana -->
+                       <mapZone other="Central Asia Standard Time" territory="001" type="Asia/Almaty"/>
+                       <mapZone other="Central Asia Standard Time" territory="AQ" type="Antarctica/Vostok"/>
+                       <mapZone other="Central Asia Standard Time" territory="IO" type="Indian/Chagos"/>
+                       <mapZone other="Central Asia Standard Time" territory="KG" type="Asia/Bishkek"/>
+                       <mapZone other="Central Asia Standard Time" territory="KZ" type="Asia/Almaty 
Asia/Qyzylorda"/>
+                       <mapZone other="Central Asia Standard Time" territory="ZZ" type="Etc/GMT-6"/>
+
+                       <!-- (UTC+06:00) Dhaka -->
+                       <mapZone other="Bangladesh Standard Time" territory="001" type="Asia/Dhaka"/>
+                       <mapZone other="Bangladesh Standard Time" territory="BD" type="Asia/Dhaka"/>
+                       <mapZone other="Bangladesh Standard Time" territory="BT" type="Asia/Thimphu"/>
+
+                       <!-- (UTC+06:00) Ekaterinburg -->
+                       <mapZone other="Ekaterinburg Standard Time" territory="001" 
type="Asia/Yekaterinburg"/>
+                       <mapZone other="Ekaterinburg Standard Time" territory="RU" type="Asia/Yekaterinburg"/>
+
+                       <!-- (UTC+06:30) Yangon (Rangoon) -->
+                       <mapZone other="Myanmar Standard Time" territory="001" type="Asia/Rangoon"/>
+                       <mapZone other="Myanmar Standard Time" territory="CC" type="Indian/Cocos"/>
+                       <mapZone other="Myanmar Standard Time" territory="MM" type="Asia/Rangoon"/>
+
+                       <!-- (UTC+07:00) Bangkok, Hanoi, Jakarta -->
+                       <mapZone other="SE Asia Standard Time" territory="001" type="Asia/Bangkok"/>
+                       <mapZone other="SE Asia Standard Time" territory="AQ" type="Antarctica/Davis"/>
+                       <mapZone other="SE Asia Standard Time" territory="CX" type="Indian/Christmas"/>
+                       <mapZone other="SE Asia Standard Time" territory="ID" type="Asia/Jakarta 
Asia/Pontianak"/>
+                       <mapZone other="SE Asia Standard Time" territory="KH" type="Asia/Phnom_Penh"/>
+                       <mapZone other="SE Asia Standard Time" territory="LA" type="Asia/Vientiane"/>
+                       <mapZone other="SE Asia Standard Time" territory="MN" type="Asia/Hovd"/>
+                       <mapZone other="SE Asia Standard Time" territory="TH" type="Asia/Bangkok"/>
+                       <mapZone other="SE Asia Standard Time" territory="VN" type="Asia/Saigon"/>
+                       <mapZone other="SE Asia Standard Time" territory="ZZ" type="Etc/GMT-7"/>
+
+                       <!-- (UTC+07:00) Novosibirsk -->
+                       <mapZone other="N. Central Asia Standard Time" territory="001" 
type="Asia/Novosibirsk"/>
+                       <mapZone other="N. Central Asia Standard Time" territory="RU" type="Asia/Novosibirsk 
Asia/Novokuznetsk Asia/Omsk"/>
+
+                       <!-- (UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi -->
+                       <mapZone other="China Standard Time" territory="001" type="Asia/Shanghai"/>
+                       <mapZone other="China Standard Time" territory="CN" type="Asia/Shanghai 
Asia/Chongqing Asia/Harbin Asia/Kashgar Asia/Urumqi"/>
+                       <mapZone other="China Standard Time" territory="HK" type="Asia/Hong_Kong"/>
+                       <mapZone other="China Standard Time" territory="MO" type="Asia/Macau"/>
+
+                       <!-- (UTC+08:00) Krasnoyarsk -->
+                       <mapZone other="North Asia Standard Time" territory="001" type="Asia/Krasnoyarsk"/>
+                       <mapZone other="North Asia Standard Time" territory="RU" type="Asia/Krasnoyarsk"/>
+
+                       <!-- (UTC+08:00) Kuala Lumpur, Singapore -->
+                       <mapZone other="Singapore Standard Time" territory="001" type="Asia/Singapore"/>
+                       <mapZone other="Singapore Standard Time" territory="BN" type="Asia/Brunei"/>
+                       <mapZone other="Singapore Standard Time" territory="ID" type="Asia/Makassar"/>
+                       <mapZone other="Singapore Standard Time" territory="MY" type="Asia/Kuala_Lumpur 
Asia/Kuching"/>
+                       <mapZone other="Singapore Standard Time" territory="PH" type="Asia/Manila"/>
+                       <mapZone other="Singapore Standard Time" territory="SG" type="Asia/Singapore"/>
+                       <mapZone other="Singapore Standard Time" territory="ZZ" type="Etc/GMT-8"/>
+
+                       <!-- (UTC+08:00) Perth -->
+                       <mapZone other="W. Australia Standard Time" territory="001" type="Australia/Perth"/>
+                       <mapZone other="W. Australia Standard Time" territory="AQ" type="Antarctica/Casey"/>
+                       <mapZone other="W. Australia Standard Time" territory="AU" type="Australia/Perth"/>
+
+                       <!-- (UTC+08:00) Taipei -->
+                       <mapZone other="Taipei Standard Time" territory="001" type="Asia/Taipei"/>
+                       <mapZone other="Taipei Standard Time" territory="TW" type="Asia/Taipei"/>
+
+                       <!-- (UTC+08:00) Ulaanbaatar -->
+                       <mapZone other="Ulaanbaatar Standard Time" territory="001" type="Asia/Ulaanbaatar"/>
+                       <mapZone other="Ulaanbaatar Standard Time" territory="MN" type="Asia/Ulaanbaatar 
Asia/Choibalsan"/>
+
+                       <!-- (UTC+09:00) Irkutsk -->
+                       <mapZone other="North Asia East Standard Time" territory="001" type="Asia/Irkutsk"/>
+                       <mapZone other="North Asia East Standard Time" territory="RU" type="Asia/Irkutsk"/>
+
+                       <!-- (UTC+09:00) Osaka, Sapporo, Tokyo -->
+                       <mapZone other="Tokyo Standard Time" territory="001" type="Asia/Tokyo"/>
+                       <mapZone other="Tokyo Standard Time" territory="ID" type="Asia/Jayapura"/>
+                       <mapZone other="Tokyo Standard Time" territory="JP" type="Asia/Tokyo"/>
+                       <mapZone other="Tokyo Standard Time" territory="PW" type="Pacific/Palau"/>
+                       <mapZone other="Tokyo Standard Time" territory="TL" type="Asia/Dili"/>
+                       <mapZone other="Tokyo Standard Time" territory="ZZ" type="Etc/GMT-9"/>
+
+                       <!-- (UTC+09:00) Seoul -->
+                       <mapZone other="Korea Standard Time" territory="001" type="Asia/Seoul"/>
+                       <mapZone other="Korea Standard Time" territory="KP" type="Asia/Pyongyang"/>
+                       <mapZone other="Korea Standard Time" territory="KR" type="Asia/Seoul"/>
+
+                       <!-- (UTC+09:30) Adelaide -->
+                       <mapZone other="Cen. Australia Standard Time" territory="001" 
type="Australia/Adelaide"/>
+                       <mapZone other="Cen. Australia Standard Time" territory="AU" type="Australia/Adelaide 
Australia/Broken_Hill"/>
+
+                       <!-- (UTC+09:30) Darwin -->
+                       <mapZone other="AUS Central Standard Time" territory="001" type="Australia/Darwin"/>
+                       <mapZone other="AUS Central Standard Time" territory="AU" type="Australia/Darwin"/>
+
+                       <!-- (UTC+10:00) Brisbane -->
+                       <mapZone other="E. Australia Standard Time" territory="001" 
type="Australia/Brisbane"/>
+                       <mapZone other="E. Australia Standard Time" territory="AU" type="Australia/Brisbane 
Australia/Lindeman"/>
+
+                       <!-- (UTC+10:00) Canberra, Melbourne, Sydney -->
+                       <mapZone other="AUS Eastern Standard Time" territory="001" type="Australia/Sydney"/>
+                       <mapZone other="AUS Eastern Standard Time" territory="AU" type="Australia/Sydney 
Australia/Melbourne"/>
+
+                       <!-- (UTC+10:00) Guam, Port Moresby -->
+                       <mapZone other="West Pacific Standard Time" territory="001" 
type="Pacific/Port_Moresby"/>
+                       <mapZone other="West Pacific Standard Time" territory="AQ" 
type="Antarctica/DumontDUrville"/>
+                       <mapZone other="West Pacific Standard Time" territory="FM" type="Pacific/Truk"/>
+                       <mapZone other="West Pacific Standard Time" territory="GU" type="Pacific/Guam"/>
+                       <mapZone other="West Pacific Standard Time" territory="MP" type="Pacific/Saipan"/>
+                       <mapZone other="West Pacific Standard Time" territory="PG" 
type="Pacific/Port_Moresby"/>
+                       <mapZone other="West Pacific Standard Time" territory="ZZ" type="Etc/GMT-10"/>
+
+                       <!-- (UTC+10:00) Hobart -->
+                       <mapZone other="Tasmania Standard Time" territory="001" type="Australia/Hobart"/>
+                       <mapZone other="Tasmania Standard Time" territory="AU" type="Australia/Hobart 
Australia/Currie"/>
+
+                       <!-- (UTC+10:00) Yakutsk -->
+                       <mapZone other="Yakutsk Standard Time" territory="001" type="Asia/Yakutsk"/>
+                       <mapZone other="Yakutsk Standard Time" territory="RU" type="Asia/Yakutsk 
Asia/Khandyga"/>
+
+                       <!-- (UTC+11:00) Solomon Is., New Caledonia -->
+                       <mapZone other="Central Pacific Standard Time" territory="001" 
type="Pacific/Guadalcanal"/>
+                       <mapZone other="Central Pacific Standard Time" territory="AU" 
type="Antarctica/Macquarie"/>
+                       <mapZone other="Central Pacific Standard Time" territory="FM" type="Pacific/Ponape 
Pacific/Kosrae"/>
+                       <mapZone other="Central Pacific Standard Time" territory="NC" type="Pacific/Noumea"/>
+                       <mapZone other="Central Pacific Standard Time" territory="SB" 
type="Pacific/Guadalcanal"/>
+                       <mapZone other="Central Pacific Standard Time" territory="VU" type="Pacific/Efate"/>
+                       <mapZone other="Central Pacific Standard Time" territory="ZZ" type="Etc/GMT-11"/>
+
+                       <!-- (UTC+11:00) Vladivostok -->
+                       <mapZone other="Vladivostok Standard Time" territory="001" type="Asia/Vladivostok"/>
+                       <mapZone other="Vladivostok Standard Time" territory="RU" type="Asia/Vladivostok 
Asia/Sakhalin Asia/Ust-Nera"/>
+
+                       <!-- (UTC+12:00) Auckland, Wellington -->
+                       <mapZone other="New Zealand Standard Time" territory="001" type="Pacific/Auckland"/>
+                       <mapZone other="New Zealand Standard Time" territory="AQ" type="Antarctica/McMurdo"/>
+                       <mapZone other="New Zealand Standard Time" territory="NZ" type="Pacific/Auckland"/>
+
+                       <!-- (UTC+12:00) Coordinated Universal Time+12 -->
+                       <mapZone other="UTC+12" territory="001" type="Etc/GMT-12"/>
+                       <mapZone other="UTC+12" territory="KI" type="Pacific/Tarawa"/>
+                       <mapZone other="UTC+12" territory="MH" type="Pacific/Majuro Pacific/Kwajalein"/>
+                       <mapZone other="UTC+12" territory="NR" type="Pacific/Nauru"/>
+                       <mapZone other="UTC+12" territory="TV" type="Pacific/Funafuti"/>
+                       <mapZone other="UTC+12" territory="UM" type="Pacific/Wake"/>
+                       <mapZone other="UTC+12" territory="WF" type="Pacific/Wallis"/>
+                       <mapZone other="UTC+12" territory="ZZ" type="Etc/GMT-12"/>
+
+                       <!-- (UTC+12:00) Fiji -->
+                       <mapZone other="Fiji Standard Time" territory="001" type="Pacific/Fiji"/>
+                       <mapZone other="Fiji Standard Time" territory="FJ" type="Pacific/Fiji"/>
+
+                       <!-- (UTC+12:00) Magadan -->
+                       <mapZone other="Magadan Standard Time" territory="001" type="Asia/Magadan"/>
+                       <mapZone other="Magadan Standard Time" territory="RU" type="Asia/Magadan Asia/Anadyr 
Asia/Kamchatka"/>
+
+                       <!-- (UTC+13:00) Nuku'alofa -->
+                       <mapZone other="Tonga Standard Time" territory="001" type="Pacific/Tongatapu"/>
+                       <mapZone other="Tonga Standard Time" territory="KI" type="Pacific/Enderbury"/>
+                       <mapZone other="Tonga Standard Time" territory="TK" type="Pacific/Fakaofo"/>
+                       <mapZone other="Tonga Standard Time" territory="TO" type="Pacific/Tongatapu"/>
+                       <mapZone other="Tonga Standard Time" territory="ZZ" type="Etc/GMT-13"/>
+
+                       <!-- (UTC+13:00) Samoa -->
+                       <mapZone other="Samoa Standard Time" territory="001" type="Pacific/Apia"/>
+                       <mapZone other="Samoa Standard Time" territory="WS" type="Pacific/Apia"/>
+               </mapTimezones>
+       </windowsZones>
+</supplementalData>
diff --git a/src/util/util-string.vala b/src/util/util-string.vala
index 693cb11..8623743 100644
--- a/src/util/util-string.vala
+++ b/src/util/util-string.vala
@@ -16,6 +16,14 @@ public int stricmp(string a, string b) {
     return strcmp(a.casefold(), b.casefold());
 }
 
+public uint stri_hash(string str) {
+    return str.down().hash();
+}
+
+public bool stri_equal(string a, string b) {
+    return stricmp(a, b) == 0;
+}
+
 /**
  * Removes redundant whitespace (including tabs and newlines) and strips whitespace from beginning
  * and end of string.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]