[evolution-ews] Bug #722419 - Inconsistent mapping between Olson and Windows format
- From: Fabiano Fidêncio <ffidencio src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Bug #722419 - Inconsistent mapping between Olson and Windows format
- Date: Fri, 7 Feb 2014 19:59:25 +0000 (UTC)
commit 0e4081405c12f634eaf1f29255652b93a6f3edda
Author: Fabiano Fidêncio <fidencio redhat com>
Date: Fri Jan 24 03:54:09 2014 +0100
Bug #722419 - Inconsistent mapping between Olson and Windows format
configure.ac | 3 +
src/calendar/Makefile.am | 5 +
src/calendar/e-cal-backend-ews-utils.c | 720 ++++++--------------------------
src/calendar/e-cal-backend-ews-utils.h | 6 +-
src/calendar/e-cal-backend-ews.c | 6 +-
src/calendar/windowsZones.xml | 660 +++++++++++++++++++++++++++++
src/server/e-ews-message.c | 131 +++++--
src/server/e-ews-message.h | 3 +
src/server/e-soap-message.h | 3 +
tests/ews-test-timezones.c | 9 +-
10 files changed, 917 insertions(+), 629 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 0f4fa8e..539e696 100644
--- a/configure.ac
+++ b/configure.ac
@@ -357,6 +357,9 @@ AC_SUBST(eds_moduledir)
evo_moduledir=`$PKG_CONFIG --variable=moduledir evolution-shell-3.0`
AC_SUBST(evo_moduledir)
+ewsdatadir=`$PKG_CONFIG --variable=privdatadir evolution-data-server-1.2`/ews
+AC_SUBST(ewsdatadir)
+
dnl *************
dnl Gtk Doc stuff
dnl *************
diff --git a/src/calendar/Makefile.am b/src/calendar/Makefile.am
index 986d6f3..5cbdf06 100644
--- a/src/calendar/Makefile.am
+++ b/src/calendar/Makefile.am
@@ -2,9 +2,12 @@ NULL =
ecal_backend_LTLIBRARIES = libecalbackendews.la
+ewsdata_DATA = windowsZones.xml
+
libecalbackendews_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
-DEXCHANGE_EWS_LOCALEDIR=\"$(localedir)\" \
+ -DEXCHANGE_EWS_DATADIR=\""$(ewsdatadir)"\" \
-I$(top_srcdir) \
-I$(top_srcdir)/src \
-I$(top_builddir) \
@@ -41,3 +44,5 @@ libecalbackendews_la_LDFLAGS = \
-module -avoid-version $(NO_UNDEFINED)
-include $(top_srcdir)/git.mk
+
+EXTRA_DIST = $(ewsdata_DATA)
diff --git a/src/calendar/e-cal-backend-ews-utils.c b/src/calendar/e-cal-backend-ews-utils.c
index ded8d1b..ad937d1 100644
--- a/src/calendar/e-cal-backend-ews-utils.c
+++ b/src/calendar/e-cal-backend-ews-utils.c
@@ -34,6 +34,11 @@
#include <glib/gstdio.h>
#include <gio/gio.h>
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+
#include <libecal/libecal.h>
#include <libsoup/soup-misc.h>
@@ -53,620 +58,156 @@ static GRecMutex tz_mutex;
static GHashTable *ical_to_msdn = NULL;
static GHashTable *msdn_to_ical = NULL;
+static guint tables_counter = 0;
-struct tz_map {
- const gchar *from;
- const gchar *to;
-};
-
-static const struct tz_map msdn_to_ical_table[] = {
- { "Dateline Standard Time", "Pacific/Apia" },
- { "Samoa Standard Time", "Pacific/Midway" },
- { "Hawaiian Standard Time", "Pacific/Honolulu" },
- { "Alaskan Standard Time", "America/Anchorage" },
- { "Pacific Standard Time", "America/Los_Angeles" },
- { "Pacific Standard Time (Mexico)", "America/Tijuana" },
- { "US Mountain Standard Time", "America/Phoenix" },
- { "Mountain Standard Time (Mexico)", "America/Mazatlan" },
- { "Mexico Standard Time 2", "America/Chihuahua" },
- { "Mountain Standard Time", "America/Denver" },
- { "Central America Standard Time", "America/Costa_Rica" },
- { "Central Standard Time", "America/Chicago" },
- { "Central Standard Time (Mexico)", "America/Monterrey" },
- { "Mexico Standard Time", "America/Mexico_City" },
- { "Canada Central Standard Time", "America/Winnipeg" },
- { "SA Pacific Standard Time", "America/Bogota" },
- { "Eastern Standard Time", "America/New_York" },
- { "US Eastern Standard Time", "America/Indiana/Indianapolis" },
- { "Venezuela Standard Time", "America/Caracas" },
- { "Atlantic Standard Time", "America/Halifax" },
- { "SA Western Standard Time", "America/La_Paz" },
- { "Central Brazilian Standard Time", "America/Manaus" },
- { "Pacific SA Standard Time", "America/La_Paz" },
- { "Newfoundland Standard Time", "America/St_Johns" },
- { "E. South America Standard Time", "America/Bahia" },
- { "SA Eastern Standard Time", "America/Argentina/Buenos_Aires" },
- { "Greenland Standard Time", "America/Godthab" },
- { "Montevideo Standard Time", "America/Montevideo" },
- { "Mid-Atlantic Standard Time", "Atlantic/South_Georgia" },
- { "Azores Standard Time", "Atlantic/Azores" },
- { "Cape Verde Standard Time", "Atlantic/Cape_Verde" },
- { "Greenwich Standard Time", "Africa/Casablanca" },
- { "GMT Standard Time", "Europe/Dublin" },
- { "UTC", "UTC" },
- { "W. Europe Standard Time", "Europe/Berlin" },
- { "Central Europe Standard Time", "Europe/Prague" },
- { "Romance Standard Time", "Europe/Paris" },
- { "Central European Standard Time", "Europe/Belgrade" },
- { "W. Central Africa Standard Time", "Africa/Luanda" },
- { "Jordan Standard Time", "Asia/Amman" },
- { "GTB Standard Time", "Europe/Athens" },
- { "Middle East Standard Time", "Asia/Beirut" },
- { "Egypt Standard Time", "Africa/Cairo" },
- { "South Africa Standard Time", "Africa/Harare" },
- { "FLE Standard Time", "Europe/Helsinki" },
- { "Israel Standard Time", "Asia/Jerusalem" },
- { "E. Europe Standard Time", "Europe/Minsk" },
- { "Namibia Standard Time", "Africa/Windhoek" },
- { "Arabic Standard Time", "Asia/Baghdad" },
- { "Arab Standard Time", "Asia/Qatar" },
- { "Russian Standard Time", "Europe/Moscow" },
- { "E. Africa Standard Time", "Africa/Nairobi" },
- { "Georgian Standard Time", "Asia/Tbilisi" },
- { "Iran Standard Time", "Asia/Tehran" },
- { "Arabian Standard Time", "Asia/Muscat" },
- { "Azerbaijan Standard Time", "Asia/Baku" },
- { "Caucasus Standard Time", "Asia/Yerevan" },
- { "Armenian Standard Time", "Asia/Yerevan" },
- { "Afghanistan Standard Time", "Asia/Kabul" },
- { "Ekaterinburg Standard Time", "Asia/Yekaterinburg" },
- { "West Asia Standard Time", "Asia/Karachi" },
- { "India Standard Time", "Asia/Kolkata" },
- { "Sri Lanka Standard Time", "Asia/Colombo" },
- { "Nepal Standard Time", "Asia/Kathmandu" },
- { "N. Central Asia Standard Time", "Asia/Novosibirsk" },
- { "Central Asia Standard Time", "Asia/Dhaka" },
- { "Myanmar Standard Time", "Asia/Rangoon" },
- { "SE Asia Standard Time", "Asia/Bangkok" },
- { "North Asia Standard Time", "Asia/Krasnoyarsk" },
- { "China Standard Time", "Asia/Shanghai" },
- { "North Asia East Standard Time", "Asia/Ulaanbaatar" },
- { "Singapore Standard Time", "Asia/Singapore" },
- { "W. Australia Standard Time", "Australia/Perth" },
- { "Taipei Standard Time", "Asia/Taipei" },
- { "Tokyo Standard Time", "Asia/Tokyo" },
- { "Korea Standard Time", "Asia/Seoul" },
- { "Yakutsk Standard Time", "Asia/Yakutsk" },
- { "Cen. Australia Standard Time", "Australia/Adelaide" },
- { "AUS Central Standard Time", "Australia/Darwin" },
- { "E. Australia Standard Time", "Australia/Brisbane" },
- { "AUS Eastern Standard Time", "Australia/Sydney" },
- { "West Pacific Standard Time", "Pacific/Guam" },
- { "Tasmania Standard Time", "Australia/Hobart" },
- { "Vladivostok Standard Time", "Asia/Vladivostok" },
- { "Central Pacific Standard Time", "Asia/Magadan" },
- { "New Zealand Standard Time", "Pacific/Auckland" },
- { "Fiji Standard Time", "Pacific/Fiji" },
- { "Tonga Standard Time", "Pacific/Tongatapu" },
-};
-
-static const struct tz_map ical_to_msdn_table[] = {
- { "UTC", "UTC" },
- { "Africa/Abidjan", "Greenwich Standard Time" },
- { "Africa/Accra", "Greenwich Standard Time" },
- { "Africa/Addis_Ababa", "E. Africa Standard Time" },
- { "Africa/Algiers", "W. Central Africa Standard Time" },
- { "Africa/Asmara", "E. Africa Standard Time" },
- { "Africa/Bamako", "Greenwich Standard Time" },
- { "Africa/Bangui", "W. Central Africa Standard Time" },
- { "Africa/Banjul", "Greenwich Standard Time" },
- { "Africa/Bissau", "Greenwich Standard Time" },
- { "Africa/Blantyre", "South Africa Standard Time" },
- { "Africa/Brazzaville", "W. Central Africa Standard Time" },
- { "Africa/Bujumbura", "South Africa Standard Time" },
- { "Africa/Cairo", "Egypt Standard Time" },
- { "Africa/Casablanca", "Greenwich Standard Time" },
- { "Africa/Ceuta", "W. Central Africa Standard Time" },
- { "Africa/Conakry", "Greenwich Standard Time" },
- { "Africa/Dakar", "Greenwich Standard Time" },
- { "Africa/Dar_es_Salaam", "E. Africa Standard Time" },
- { "Africa/Djibouti", "E. Africa Standard Time" },
- { "Africa/Douala", "W. Central Africa Standard Time" },
- { "Africa/El_Aaiun", "Greenwich Standard Time" },
- { "Africa/Freetown", "Greenwich Standard Time" },
- { "Africa/Gaborone", "South Africa Standard Time" },
- { "Africa/Harare", "South Africa Standard Time" },
- { "Africa/Johannesburg", "South Africa Standard Time" },
- { "Africa/Juba", "E. Africa Standard Time" },
- { "Africa/Kampala", "E. Africa Standard Time" },
- { "Africa/Khartoum", "E. Africa Standard Time" },
- { "Africa/Kigali", "Egypt Standard Time" },
- { "Africa/Kinshasa", "W. Central Africa Standard Time" },
- { "Africa/Lagos", "Greenwich Standard Time" },
- { "Africa/Libreville", "W. Central Africa Standard Time" },
- { "Africa/Lome", "Greenwich Standard Time" },
- { "Africa/Luanda", "W. Central Africa Standard Time" },
- { "Africa/Lubumbashi", "South Africa Standard Time" },
- { "Africa/Lusaka", "South Africa Standard Time" },
- { "Africa/Malabo", "W. Central Africa Standard Time" },
- { "Africa/Maputo", "South Africa Standard Time" },
- { "Africa/Maseru", "South Africa Standard Time" },
- { "Africa/Mbabane", "South Africa Standard Time" },
- { "Africa/Mogadishu", "E. Africa Standard Time" },
- { "Africa/Monrovia", "Greenwich Standard Time" },
- { "Africa/Nairobi", "E. Africa Standard Time" },
- { "Africa/Ndjamena", "W. Central Africa Standard Time" },
- { "Africa/Niamey", "W. Central Africa Standard Time" },
- { "Africa/Nouakchott", "Greenwich Standard Time" },
- { "Africa/Ouagadougou", "Greenwich Standard Time" },
- { "Africa/Porto-Novo", "W. Central Africa Standard Time" },
- { "Africa/Sao_Tome", "Cape Verde Standard Time" },
- { "Africa/Tripoli", "Egypt Standard Time" },
- { "Africa/Tunis", "W. Central Africa Standard Time" },
- { "Africa/Windhoek", "Namibia Standard Time" },
- { "America/Adak", "Hawaiian Standard Time" },
- { "America/Anchorage", "Alaskan Standard Time" },
- { "America/Anguilla", "SA Western Standard Time" },
- { "America/Antigua", "SA Western Standard Time" },
- { "America/Araguaina", "E. South America Standard Time" },
- { "America/Argentina/Buenos_Aires", "SA Eastern Standard Time" },
- { "America/Argentina/Catamarca", "SA Eastern Standard Time" },
- { "America/Argentina/Cordoba", "SA Eastern Standard Time" },
- { "America/Argentina/Jujuy", "SA Eastern Standard Time" },
- { "America/Argentina/La_Rioja", "SA Eastern Standard Time" },
- { "America/Argentina/Mendoza", "SA Eastern Standard Time" },
- { "America/Argentina/Rio_Gallegos", "SA Eastern Standard Time" },
- { "America/Argentina/Salta", "SA Eastern Standard Time" },
- { "America/Argentina/San_Luis", "SA Eastern Standard Time" },
- { "America/Argentina/San_Juan", "SA Eastern Standard Time" },
- { "America/Argentina/Tucuman", "SA Eastern Standard Time" },
- { "America/Argentina/Ushuaia", "SA Eastern Standard Time" },
- { "America/Aruba", "Venezuela Standard Time" },
- { "America/Asuncion", "SA Eastern Standard Time" },
- { "America/Atikokan", "US Eastern Standard Time" },
- { "America/Bahia", "E. South America Standard Time" },
- { "America/Bahia_Banderas", "Central Standard Time (Mexico)" },
- { "America/Barbados", "SA Western Standard Time" },
- { "America/Belem", "E. South America Standard Time" },
- { "America/Belize", "Mexico Standard Time" },
- { "America/Blanc-Sablon", "Atlantic Standard Time" },
- { "America/Boa_Vista", "SA Western Standard Time" },
- { "America/Bogota", "SA Pacific Standard Time" },
- { "America/Boise", "US Mountain Standard Time" },
- { "America/Cambridge_Bay", "Mountain Standard Time" },
- { "America/Campo_Grande", "E. South America Standard Time" },
- { "America/Cancun", "Central America Standard Time" },
- { "America/Caracas", "Venezuela Standard Time" },
- { "America/Cayenne", "E. South America Standard Time" },
- { "America/Cayman", "SA Pacific Standard Time" },
- { "America/Chicago", "Central Standard Time" },
- { "America/Chihuahua", "Mexico Standard Time 2" },
- { "America/Costa_Rica", "Central America Standard Time" },
- { "America/Creston", "Mountain Standard Time" },
- { "America/Cuiaba", "E. South America Standard Time" },
- { "America/Curacao", "Venezuela Standard Time" },
- { "America/Danmarkshavn", "GMT Standard Time" },
- { "America/Dawson", "Pacific Standard Time" },
- { "America/Dawson_Creek", "Mountain Standard Time" },
- { "America/Denver", "Mountain Standard Time" },
- { "America/Detroit", "Eastern Standard Time" },
- { "America/Dominica", "SA Western Standard Time" },
- { "America/Edmonton", "Mountain Standard Time" },
- { "America/Eirunepe", "SA Pacific Standard Time" },
- { "America/El_Salvador", "Central America Standard Time" },
- { "America/Fortaleza", "E. South America Standard Time" },
- { "America/Glace_Bay", "Atlantic Standard Time" },
- { "America/Godthab", "Greenland Standard Time" },
- { "America/Goose_Bay", "Atlantic Standard Time" },
- { "America/Grand_Turk", "SA Pacific Standard Time" },
- { "America/Grenada", "SA Western Standard Time" },
- { "America/Guadeloupe", "SA Western Standard Time" },
- { "America/Guatemala", "Central America Standard Time" },
- { "America/Guayaquil", "SA Pacific Standard Time" },
- { "America/Guyana", "Venezuela Standard Time" },
- { "America/Halifax", "Atlantic Standard Time" },
- { "America/Havana", "SA Pacific Standard Time" },
- { "America/Hermosillo", "Mexico Standard Time 2" },
- { "America/Indiana/Indianapolis", "US Eastern Standard Time" },
- { "America/Indiana/Knox", "Canada Central Standard Time" },
- { "America/Indiana/Marengo", "US Eastern Standard Time" },
- { "America/Indiana/Petersburg", "US Eastern Standard Time" },
- { "America/Indiana/Tell_City", "Canada Central Standard Time" },
- { "America/Indiana/Vevay", "US Eastern Standard Time" },
- { "America/Indiana/Vincennes", "US Eastern Standard Time" },
- { "America/Indiana/Winamac", "US Eastern Standard Time" },
- { "America/Inuvik", "Mountain Standard Time" },
- { "America/Iqaluit", "Eastern Standard Time" },
- { "America/Jamaica", "SA Pacific Standard Time" },
- { "America/Juneau", "Alaskan Standard Time" },
- { "America/Kentucky/Louisville", "US Eastern Standard Time" },
- { "America/Kentucky/Monticello", "US Eastern Standard Time" },
- { "America/Kralendijk", "Venezuela Standard Time" },
- { "America/La_Paz", "SA Western Standard Time" },
- { "America/Lima", "SA Pacific Standard Time" },
- { "America/Los_Angeles", "Pacific Standard Time" },
- { "America/Lower_Princes", "Venezuela Standard Time" },
- { "America/Maceio", "E. South America Standard Time" },
- { "America/Managua", "Central America Standard Time" },
- { "America/Manaus", "Central Brazilian Standard Time" },
- { "America/Marigot", "SA Western Standard Time" },
- { "America/Martinique", "SA Western Standard Time" },
- { "America/Matamoros", "Central Standard Time" },
- { "America/Mazatlan", "Mountain Standard Time (Mexico)" },
- { "America/Menominee", "Central Standard Time" },
- { "America/Merida", "Central America Standard Time" },
- { "America/Metlakatla", "Alaskan Standard Time" },
- { "America/Mexico_City", "Mexico Standard Time" },
- { "America/Miquelon", "Greenland Standard Time" },
- { "America/Moncton", "Atlantic Standard Time" },
- { "America/Monterrey", "Central Standard Time (Mexico)" },
- { "America/Montevideo", "Montevideo Standard Time" },
- { "America/Montreal", "Eastern Standard Time" },
- { "America/Montserrat", "SA Western Standard Time" },
- { "America/Nassau", "Eastern Standard Time" },
- { "America/New_York", "Eastern Standard Time" },
- { "America/Nipigon", "Eastern Standard Time" },
- { "America/Nome", "Alaskan Standard Time" },
- { "America/Noronha", "Mid-Atlantic Standard Time" },
- { "America/North_Dakota/Beulah", "Central Standard Time" },
- { "America/North_Dakota/Center", "Central Standard Time" },
- { "America/North_Dakota/New_Salem", "Central Standard Time" },
- { "America/Ojinaga", "Mexico Standard Time 2" },
- { "America/Panama", "SA Pacific Standard Time" },
- { "America/Pangnirtung", "Eastern Standard Time" },
- { "America/Paramaribo", "Venezuela Standard Time" },
- { "America/Phoenix", "US Mountain Standard Time" },
- { "America/Port-au-Prince", "SA Western Standard Time" },
- { "America/Port_of_Spain", "SA Western Standard Time" },
- { "America/Porto_Velho", "SA Western Standard Time" },
- { "America/Puerto_Rico", "SA Western Standard Time" },
- { "America/Rainy_River", "Canada Central Standard Time" },
- { "America/Rankin_Inlet", "Canada Central Standard Time" },
- { "America/Recife", "E. South America Standard Time" },
- { "America/Regina", "Central America Standard Time" },
- { "America/Resolute", "Eastern Standard Time" },
- { "America/Rio_Branco", "SA Pacific Standard Time" },
- { "America/Santa_Isabel", "Pacific Standard Time (Mexico)" },
- { "America/Santarem", "E. South America Standard Time" },
- { "America/Santiago", "Pacific SA Standard Time" },
- { "America/Santo_Domingo", "SA Western Standard Time" },
- { "America/Sao_Paulo", "Mid-Atlantic Standard Time" },
- { "America/Scoresbysund", "Azores Standard Time" },
- { "America/Shiprock", "US Mountain Standard Time" },
- { "America/Sitka", "Alaskan Standard Time" },
- { "America/St_Barthelemy", "SA Western Standard Time" },
- { "America/St_Johns", "Newfoundland Standard Time" },
- { "America/St_Kitts", "SA Western Standard Time" },
- { "America/St_Lucia", "SA Western Standard Time" },
- { "America/St_Thomas", "SA Western Standard Time" },
- { "America/St_Vincent", "SA Western Standard Time" },
- { "America/Swift_Current", "Central Standard Time" },
- { "America/Tegucigalpa", "Central America Standard Time" },
- { "America/Thule", "Atlantic Standard Time" },
- { "America/Thunder_Bay", "Eastern Standard Time" },
- { "America/Tijuana", "Pacific Standard Time (Mexico)" },
- { "America/Toronto", "Eastern Standard Time" },
- { "America/Tortola", "SA Western Standard Time" },
- { "America/Vancouver", "Pacific Standard Time" },
- { "America/Whitehorse", "Pacific Standard Time" },
- { "America/Winnipeg", "Canada Central Standard Time" },
- { "America/Yakutat", "Alaskan Standard Time" },
- { "America/Yellowknife", "Mountain Standard Time" },
- { "Antarctica/Casey", "GMT Standard Time" },
- { "Antarctica/Davis", "SE Asia Standard Time" },
- { "Antarctica/DumontDUrville", "West Pacific Standard Time" },
- { "Antarctica/Macquarie", "Central Pacific Standard Time" },
- { "Antarctica/Mawson", "GMT Standard Time" },
- { "Antarctica/McMurdo", "Tonga Standard Time" },
- { "Antarctica/Palmer", "Greenland Standard Time" },
- { "Antarctica/Rothera", "GMT Standard Time" },
- { "Antarctica/South_Pole", "GMT Standard Time" },
- { "Antarctica/Syowa", "GMT Standard Time" },
- { "Antarctica/Vostok", "GMT Standard Time" },
- { "Arctic/Longyearbyen", "Central Europe Standard Time" },
- { "Asia/Aden", "Arab Standard Time" },
- { "Asia/Almaty", "N. Central Asia Standard Time" },
- { "Asia/Amman", "Jordan Standard Time" },
- { "Asia/Anadyr", "Fiji Standard Time" },
- { "Asia/Aqtau", "Ekaterinburg Standard Time" },
- { "Asia/Aqtobe", "Ekaterinburg Standard Time" },
- { "Asia/Ashgabat", "Ekaterinburg Standard Time" },
- { "Asia/Baghdad", "Arabic Standard Time" },
- { "Asia/Bahrain", "Arab Standard Time" },
- { "Asia/Baku", "Azerbaijan Standard Time" },
- { "Asia/Bangkok", "SE Asia Standard Time" },
- { "Asia/Beijing", "China Standard Time" },
- { "Asia/Beirut", "Middle East Standard Time" },
- { "Asia/Bishkek", "Central Asia Standard Time" },
- { "Asia/Brunei", "Taipei Standard Time" },
- { "Asia/Kolkata", "India Standard Time" },
- { "Asia/Choibalsan", "Yakutsk Standard Time" },
- { "Asia/Chongqing", "China Standard Time" },
- { "Asia/Colombo", "India Standard Time" },
- { "Asia/Damascus", "Israel Standard Time" },
- { "Asia/Dhaka", "Central Asia Standard Time" },
- { "Asia/Dili", "Yakutsk Standard Time" },
- { "Asia/Dubai", "Iran Standard Time" },
- { "Asia/Dushanbe", "West Asia Standard Time" },
- { "Asia/Gaza", "Israel Standard Time" },
- { "Asia/Harbin", "China Standard Time" },
- { "Asia/Hebron", "Israel Standard Time" },
- { "Asia/Ho_Chi_Minh", "North Asia Standard Time" },
- { "Asia/Hong_Kong", "China Standard Time" },
- { "Asia/Hovd", "North Asia Standard Time" },
- { "Asia/Irkutsk", "North Asia East Standard Time" },
- { "Asia/Jakarta", "SE Asia Standard Time" },
- { "Asia/Jayapura", "Yakutsk Standard Time" },
- { "Asia/Jerusalem", "Israel Standard Time" },
- { "Asia/Kabul", "Afghanistan Standard Time" },
- { "Asia/Kamchatka", "Fiji Standard Time" },
- { "Asia/Karachi", "West Asia Standard Time" },
- { "Asia/Kashgar", "China Standard Time" },
- { "Asia/Kathmandu", "Nepal Standard Time" },
- { "Asia/Khandyga", "Yakutsk Standard Time" },
- { "Asia/Krasnoyarsk", "North Asia Standard Time" },
- { "Asia/Kuala_Lumpur", "Singapore Standard Time" },
- { "Asia/Kuching", "Taipei Standard Time" },
- { "Asia/Kuwait", "Arab Standard Time" },
- { "Asia/Macau", "China Standard Time" },
- { "Asia/Magadan", "Central Pacific Standard Time" },
- { "Asia/Makassar", "Taipei Standard Time" },
- { "Asia/Manila", "Taipei Standard Time" },
- { "Asia/Muscat", "Arabian Standard Time" },
- { "Asia/Nicosia", "Israel Standard Time" },
- { "Asia/Novokuznetsk", "N. Central Asia Standard Time" },
- { "Asia/Novosibirsk", "N. Central Asia Standard Time" },
- { "Asia/Omsk", "N. Central Asia Standard Time" },
- { "Asia/Oral", "Ekaterinburg Standard Time" },
- { "Asia/Phnom_Penh", "SE Asia Standard Time" },
- { "Asia/Pontianak", "SE Asia Standard Time" },
- { "Asia/Pyongyang", "Korea Standard Time" },
- { "Asia/Qatar", "Arab Standard Time" },
- { "Asia/Qyzylorda", "Central Asia Standard Time" },
- { "Asia/Rangoon", "Myanmar Standard Time" },
- { "Asia/Riyadh", "Arab Standard Time" },
- { "Asia/Saigon", "SE Asia Standard Time" },
- { "Asia/Sakhalin", "Vladivostok Standard Time" },
- { "Asia/Samarkand", "West Asia Standard Time" },
- { "Asia/Seoul", "Korea Standard Time" },
- { "Asia/Shanghai", "China Standard Time" },
- { "Asia/Singapore", "Singapore Standard Time" },
- { "Asia/Taipei", "Taipei Standard Time" },
- { "Asia/Tashkent", "West Asia Standard Time" },
- { "Asia/Tbilisi", "Georgian Standard Time" },
- { "Asia/Tehran", "Iran Standard Time" },
- { "Asia/Thimphu", "Central Asia Standard Time" },
- { "Asia/Tokyo", "Tokyo Standard Time" },
- { "Asia/Ulaanbaatar", "North Asia East Standard Time" },
- { "Asia/Ust-Nera", "Yakutsk Standard Time" },
- { "Asia/Urumqi", "China Standard Time" },
- { "Asia/Vientiane", "SE Asia Standard Time" },
- { "Asia/Vladivostok", "Vladivostok Standard Time" },
- { "Asia/Yakutsk", "Yakutsk Standard Time" },
- { "Asia/Yekaterinburg", "Ekaterinburg Standard Time" },
- { "Asia/Yerevan", "Armenian Standard Time" },
- { "Atlantic/Azores", "Azores Standard Time" },
- { "Atlantic/Bermuda", "Atlantic Standard Time" },
- { "Atlantic/Canary", "GMT Standard Time" },
- { "Atlantic/Cape_Verde", "Cape Verde Standard Time" },
- { "Atlantic/Faroe", "GMT Standard Time" },
- { "Atlantic/Jan_Mayen", "W. Europe Standard Time" },
- { "Atlantic/Madeira", "GMT Standard Time" },
- { "Atlantic/Reykjavik", "GMT Standard Time" },
- { "Atlantic/South_Georgia", "Mid-Atlantic Standard Time" },
- { "Atlantic/Stanley", "SA Eastern Standard Time" },
- { "Atlantic/St_Helena", "Greenwich Standard Time" },
- { "Australia/Adelaide", "Cen. Australia Standard Time" },
- { "Australia/Brisbane", "E. Australia Standard Time" },
- { "Australia/Broken_Hill", "Cen. Australia Standard Time" },
- { "Australia/Currie", "AUS Eastern Standard Time" },
- { "Australia/Darwin", "AUS Central Standard Time" },
- { "Australia/Eucla", "AUS Central Standard Time" },
- { "Australia/Hobart", "Tasmania Standard Time" },
- { "Australia/Lindeman", "E. Australia Standard Time" },
- { "Australia/Lord_Howe", "AUS Eastern Standard Time" },
- { "Australia/Melbourne", "AUS Eastern Standard Time" },
- { "Australia/Perth", "W. Australia Standard Time" },
- { "Australia/Sydney", "AUS Eastern Standard Time" },
- { "Europe/Amsterdam", "W. Europe Standard Time" },
- { "Europe/Andorra", "W. Europe Standard Time" },
- { "Europe/Athens", "GTB Standard Time" },
- { "Europe/Belgrade", "Central European Standard Time" },
- { "Europe/Berlin", "W. Europe Standard Time" },
- { "Europe/Bratislava", "Central Europe Standard Time" },
- { "Europe/Brussels", "Romance Standard Time" },
- { "Europe/Bucharest", "E. Europe Standard Time" },
- { "Europe/Budapest", "Central Europe Standard Time" },
- { "Europe/Busingen", "W. Europe Standard Time" },
- { "Europe/Chisinau", "FLE Standard Time" },
- { "Europe/Copenhagen", "Romance Standard Time" },
- { "Europe/Dublin", "GMT Standard Time" },
- { "Europe/Gibraltar", "Romance Standard Time" },
- { "Europe/Guernsey", "GMT Standard Time" },
- { "Europe/Helsinki", "FLE Standard Time" },
- { "Europe/Isle_of_Man", "GMT Standard Time" },
- { "Europe/Istanbul", "GTB Standard Time" },
- { "Europe/Jersey", "GMT Standard Time" },
- { "Europe/Kaliningrad", "FLE Standard Time" },
- { "Europe/Kiev", "FLE Standard Time" },
- { "Europe/Lisbon", "GMT Standard Time" },
- { "Europe/Ljubljana", "Central Europe Standard Time" },
- { "Europe/London", "GMT Standard Time" },
- { "Europe/Luxembourg", "Romance Standard Time" },
- { "Europe/Madrid", "Romance Standard Time" },
- { "Europe/Malta", "W. Europe Standard Time" },
- { "Europe/Mariehamn", "FLE Standard Time" },
- { "Europe/Minsk", "E. Europe Standard Time" },
- { "Europe/Monaco", "W. Europe Standard Time" },
- { "Europe/Moscow", "Russian Standard Time" },
- { "Europe/Oslo", "W. Europe Standard Time" },
- { "Europe/Paris", "Romance Standard Time" },
- { "Europe/Podgorica", "Central European Standard Time" },
- { "Europe/Prague", "Central Europe Standard Time" },
- { "Europe/Riga", "FLE Standard Time" },
- { "Europe/Rome", "W. Europe Standard Time" },
- { "Europe/Samara", "Caucasus Standard Time" },
- { "Europe/San_Marino", "W. Europe Standard Time" },
- { "Europe/Sarajevo", "Central European Standard Time" },
- { "Europe/Simferopol", "FLE Standard Time" },
- { "Europe/Skopje", "Central European Standard Time" },
- { "Europe/Sofia", "FLE Standard Time" },
- { "Europe/Stockholm", "W. Europe Standard Time" },
- { "Europe/Tallinn", "FLE Standard Time" },
- { "Europe/Tirane", "Central European Standard Time" },
- { "Europe/Uzhgorod", "FLE Standard Time" },
- { "Europe/Vaduz", "W. Europe Standard Time" },
- { "Europe/Vatican", "W. Europe Standard Time" },
- { "Europe/Vienna", "W. Europe Standard Time" },
- { "Europe/Vilnius", "FLE Standard Time" },
- { "Europe/Volgograd", "Russian Standard Time" },
- { "Europe/Warsaw", "Central European Standard Time" },
- { "Europe/Zagreb", "Central European Standard Time" },
- { "Europe/Zaporozhye", "FLE Standard Time" },
- { "Europe/Zurich", "W. Europe Standard Time" },
- { "Indian/Antananarivo", "E. Africa Standard Time" },
- { "Indian/Chagos", "Sri Lanka Standard Time" },
- { "Indian/Christmas", "SE Asia Standard Time" },
- { "Indian/Cocos", "Myanmar Standard Time" },
- { "Indian/Comoro", "E. Africa Standard Time" },
- { "Indian/Kerguelen", "GMT Standard Time" },
- { "Indian/Mahe", "Iran Standard Time" },
- { "Indian/Maldives", "West Asia Standard Time" },
- { "Indian/Mauritius", "Arabian Standard Time" },
- { "Indian/Mayotte", "E. Africa Standard Time" },
- { "Indian/Reunion", "Iran Standard Time" },
- { "Pacific/Apia", "Dateline Standard Time" },
- { "Pacific/Auckland", "New Zealand Standard Time" },
- { "Pacific/Chatham", "Tonga Standard Time" },
- { "Pacific/Chuuk", "West Pacific Standard Time" },
- { "Pacific/Easter", "SA Pacific Standard Time" },
- { "Pacific/Efate", "Central Pacific Standard Time" },
- { "Pacific/Enderbury", "Tonga Standard Time" },
- { "Pacific/Fakaofo", "Hawaiian Standard Time" },
- { "Pacific/Fiji", "Fiji Standard Time" },
- { "Pacific/Funafuti", "Fiji Standard Time" },
- { "Pacific/Galapagos", "Mexico Standard Time" },
- { "Pacific/Gambier", "Alaskan Standard Time" },
- { "Pacific/Guadalcanal", "Central Pacific Standard Time" },
- { "Pacific/Guam", "West Pacific Standard Time" },
- { "Pacific/Honolulu", "Hawaiian Standard Time" },
- { "Pacific/Johnston", "Hawaiian Standard Time" },
- { "Pacific/Kiritimati", "Tonga Standard Time" },
- { "Pacific/Kosrae", "Central Pacific Standard Time" },
- { "Pacific/Kwajalein", "Fiji Standard Time" },
- { "Pacific/Majuro", "Central Pacific Standard Time" },
- { "Pacific/Marquesas", "Alaskan Standard Time" },
- { "Pacific/Midway", "Samoa Standard Time" },
- { "Pacific/Nauru", "Fiji Standard Time" },
- { "Pacific/Niue", "Samoa Standard Time" },
- { "Pacific/Norfolk", "Central Pacific Standard Time" },
- { "Pacific/Noumea", "Central Pacific Standard Time" },
- { "Pacific/Pago_Pago", "Samoa Standard Time" },
- { "Pacific/Palau", "Yakutsk Standard Time" },
- { "Pacific/Pitcairn", "Pacific Standard Time" },
- { "Pacific/Pohnpei", "Central Pacific Standard Time" },
- { "Pacific/Ponape", "Central Pacific Standard Time" },
- { "Pacific/Port_Moresby", "West Pacific Standard Time" },
- { "Pacific/Rarotonga", "Hawaiian Standard Time" },
- { "Pacific/Saipan", "West Pacific Standard Time" },
- { "Pacific/Tahiti", "Hawaiian Standard Time" },
- { "Pacific/Tarawa", "Fiji Standard Time" },
- { "Pacific/Tongatapu", "Tonga Standard Time" },
- { "Pacific/Truk", "West Pacific Standard Time" },
- { "Pacific/Wake", "Fiji Standard Time" },
- { "Pacific/Wallis", "Fiji Standard Time" },
-};
-
-const gchar *
-e_cal_backend_ews_tz_util_get_msdn_equivalent (const gchar *ical_tz_location)
+void
+e_cal_backend_ews_populate_windows_zones (void)
{
- const gchar *msdn_tz_location = NULL;
-
- g_return_val_if_fail (ical_tz_location != NULL, NULL);
+ const gchar *xpath_eval_exp;
+ gchar *filename = NULL;
+ xmlDocPtr doc;
+ xmlXPathContextPtr xpath_ctxt;
+ xmlXPathObjectPtr xpath_obj;
+ xmlNodeSetPtr nodes;
+ gint i, len;
g_rec_mutex_lock (&tz_mutex);
- msdn_tz_location = g_hash_table_lookup (ical_to_msdn, ical_tz_location);
- g_rec_mutex_unlock (&tz_mutex);
+ if (ical_to_msdn != NULL && msdn_to_ical != NULL) {
+ g_hash_table_ref (ical_to_msdn);
+ g_hash_table_ref (msdn_to_ical);
+ tables_counter++;
- return msdn_tz_location;
-}
+ g_rec_mutex_unlock (&tz_mutex);
+ return;
+ }
-void
-e_cal_backend_ews_populate_tz_ical_to_msdn (void)
-{
- gint i;
+ filename = g_build_filename (EXCHANGE_EWS_DATADIR, "windowsZones.xml", NULL);
+ doc = xmlReadFile (filename, NULL, 0);
+
+ if (doc == NULL) {
+ g_warning (G_STRLOC "Could not map %s file.", filename);
+ g_free (filename);
- g_rec_mutex_lock (&tz_mutex);
- if (ical_to_msdn != NULL) {
- ical_to_msdn = g_hash_table_ref (ical_to_msdn);
g_rec_mutex_unlock (&tz_mutex);
return;
}
- ical_to_msdn = g_hash_table_new (g_str_hash, g_str_equal);
+ xpath_eval_exp = "/supplementalData/windowsZones/mapTimezones/mapZone";
- for (i = 0; i < G_N_ELEMENTS (ical_to_msdn_table); i++)
- g_hash_table_insert (
- ical_to_msdn,
- (gchar *) ical_to_msdn_table[i].from,
- (gchar *) ical_to_msdn_table[i].to);
+ xpath_ctxt = xmlXPathNewContext (doc);
+ xpath_obj = xmlXPathEvalExpression (BAD_CAST xpath_eval_exp, xpath_ctxt);
- g_rec_mutex_unlock (&tz_mutex);
-}
+ if (xpath_obj == NULL) {
+ g_warning (G_STRLOC "Unable to evaluate xpath expression \"%s\".", xpath_eval_exp);
+ xmlXPathFreeContext (xpath_ctxt);
+ xmlFreeDoc (doc);
+ g_free (filename);
-const gchar *
-e_cal_backend_ews_tz_util_get_ical_equivalent (const gchar *msdn_tz_location)
-{
- const gchar *ical_tz_location = NULL;
+ g_rec_mutex_unlock (&tz_mutex);
+ return;
+ }
- g_return_val_if_fail (msdn_tz_location != NULL, NULL);
+ nodes = xpath_obj->nodesetval;
+ len = nodes->nodeNr;
- g_rec_mutex_lock (&tz_mutex);
- ical_tz_location = g_hash_table_lookup (msdn_to_ical, msdn_tz_location);
- g_rec_mutex_unlock (&tz_mutex);
+ msdn_to_ical = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+ ical_to_msdn = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+ tables_counter++;
- return ical_tz_location;
-}
+ for (i = 0; i < len; i++) {
+ xmlChar *msdn = xmlGetProp (nodes->nodeTab[i], BAD_CAST "other");
+ xmlChar *ical = xmlGetProp (nodes->nodeTab[i], BAD_CAST "type");
+ gchar **tokens;
+ gint tokens_len;
-void
-e_cal_backend_ews_populate_tz_msdn_to_ical (void)
-{
- gint i;
+ tokens = g_strsplit ((gchar *) ical, " ", 0);
+ tokens_len = g_strv_length (tokens);
+ if (tokens_len == 1) {
+ g_hash_table_insert (msdn_to_ical, g_strdup ((gchar *) msdn), g_strdup ((gchar *)
ical));
+ g_hash_table_insert (ical_to_msdn, g_strdup ((gchar *) ical), g_strdup ((gchar *)
msdn));
+ } else {
+ gint j;
+ for (j = 0; j < tokens_len; j++) {
+ g_hash_table_insert (msdn_to_ical, g_strdup ((gchar *) msdn), g_strdup
(tokens[j]));
+ g_hash_table_insert (ical_to_msdn, g_strdup (tokens[j]), g_strdup ((gchar *)
msdn));
+ }
+ }
- g_rec_mutex_lock (&tz_mutex);
- if (msdn_to_ical != NULL) {
- msdn_to_ical = g_hash_table_ref (msdn_to_ical);
- g_rec_mutex_unlock (&tz_mutex);
- return;
+ g_strfreev (tokens);
+ xmlFree (ical);
+ xmlFree (msdn);
}
- msdn_to_ical = g_hash_table_new (g_str_hash, g_str_equal);
-
- for (i = 0; i < G_N_ELEMENTS (msdn_to_ical_table); i++)
- g_hash_table_insert (
- msdn_to_ical,
- (gchar *) msdn_to_ical_table[i].from,
- (gchar *) msdn_to_ical_table[i].to);
+ xmlXPathFreeObject (xpath_obj);
+ xmlXPathFreeContext (xpath_ctxt);
+ xmlFreeDoc (doc);
+ g_free (filename);
g_rec_mutex_unlock (&tz_mutex);
}
void
-e_cal_backend_ews_unref_tz_ical_to_msdn (void)
+e_cal_backend_ews_unref_windows_zones (void)
{
g_rec_mutex_lock (&tz_mutex);
if (ical_to_msdn != NULL)
g_hash_table_unref (ical_to_msdn);
+
+ if (msdn_to_ical != NULL)
+ g_hash_table_unref (msdn_to_ical);
+
+ if (tables_counter > 0) {
+ tables_counter--;
+
+ if (tables_counter == 0) {
+ ical_to_msdn = NULL;
+ msdn_to_ical = NULL;
+ }
+ }
+
g_rec_mutex_unlock (&tz_mutex);
}
-void
-e_cal_backend_ews_unref_tz_msdn_to_ical (void)
+const gchar *
+e_cal_backend_ews_tz_util_get_msdn_equivalent (const gchar *ical_tz_location)
{
+ const gchar *msdn_tz_location = NULL;
+
+ g_return_val_if_fail (ical_tz_location != NULL, NULL);
+
g_rec_mutex_lock (&tz_mutex);
- if (msdn_to_ical != NULL)
- g_hash_table_unref (msdn_to_ical);
+ if (ical_to_msdn == NULL) {
+ g_rec_mutex_unlock (&tz_mutex);
+
+ g_warn_if_reached ();
+ return NULL;
+ }
+
+ msdn_tz_location = g_hash_table_lookup (ical_to_msdn, ical_tz_location);
g_rec_mutex_unlock (&tz_mutex);
+
+ return msdn_tz_location;
+}
+
+const gchar *
+e_cal_backend_ews_tz_util_get_ical_equivalent (const gchar *msdn_tz_location)
+{
+ const gchar *ical_tz_location = NULL;
+
+ g_return_val_if_fail (msdn_tz_location != NULL, NULL);
+
+ g_rec_mutex_lock (&tz_mutex);
+ if (msdn_to_ical == NULL) {
+ g_rec_mutex_unlock (&tz_mutex);
+
+ g_warn_if_reached ();
+ return NULL;
+ }
+
+ ical_tz_location = g_hash_table_lookup (msdn_to_ical, msdn_tz_location);
+ g_rec_mutex_unlock (&tz_mutex);
+
+ return ical_tz_location;
}
EwsCalendarConvertData *
@@ -1722,6 +1263,7 @@ convert_vevent_calcomp_to_xml (ESoapMessage *msg,
icalproperty *prop;
gboolean has_alarms, satisfies;
const gchar *ical_location_start, *ical_location_end, *value;
+ const gchar *msdn_location_start, *msdn_location_end;
e_cal_component_set_icalcomponent (comp, icalcomp);
@@ -1819,19 +1361,19 @@ convert_vevent_calcomp_to_xml (ESoapMessage *msg,
ewscal_set_reccurence (msg, prop, &dtstart);
}
+ msdn_location_start = e_cal_backend_ews_tz_util_get_msdn_equivalent (ical_location_start);
+ msdn_location_end = e_cal_backend_ews_tz_util_get_msdn_equivalent (ical_location_end);
+ satisfies = e_ews_connection_satisfies_server_version (convert_data->connection, E_EWS_EXCHANGE_2010);
+
/* We have to cast these because libical puts a const pointer into the
* icaltimetype, but its basic read-only icaltimezone_foo() functions
* take a non-const pointer! */
- if (satisfies) {
- const gchar *msdn_location;
+ if (satisfies && msdn_location_start != NULL && msdn_location_end != NULL) {
GSList *msdn_locations = NULL;
GSList *tzds = NULL;
- msdn_location = e_cal_backend_ews_tz_util_get_msdn_equivalent (ical_location_start);
- msdn_locations = g_slist_append (msdn_locations, (gchar *) msdn_location);
-
- msdn_location = e_cal_backend_ews_tz_util_get_msdn_equivalent (ical_location_end);
- msdn_locations = g_slist_append (msdn_locations, (gchar *) msdn_location);
+ msdn_locations = g_slist_append (msdn_locations, (gchar *) msdn_location_start);
+ msdn_locations = g_slist_append (msdn_locations, (gchar *) msdn_location_end);
if (e_ews_connection_get_server_time_zones_sync (
convert_data->connection,
@@ -1847,6 +1389,8 @@ convert_vevent_calcomp_to_xml (ESoapMessage *msg,
g_slist_free (msdn_locations);
g_slist_free_full (tzds, (GDestroyNotify) e_ews_calendar_time_zone_definition_free);
} else {
+ e_ews_message_replace_server_version (msg, E_EWS_EXCHANGE_2007_SP1);
+
ewscal_set_meeting_timezone (msg, tzid_start);
}
@@ -2272,7 +1816,7 @@ convert_vevent_component_to_updatexml (ESoapMessage *msg,
GSList *tmp;
tmp = tzds;
- if (dtstart.zone != NULL) {
+ if (tzid_start != NULL) {
e_ews_message_start_set_item_field (msg, "StartTimeZone", "calendar",
"CalendarItem");
ewscal_set_timezone (msg, "StartTimeZone", tmp->data);
e_ews_message_end_set_item_field (msg);
@@ -2285,7 +1829,7 @@ convert_vevent_component_to_updatexml (ESoapMessage *msg,
tmp = tmp->next;
}
- if (dtend.zone != NULL) {
+ if (tzid_end != NULL) {
e_ews_message_start_set_item_field (msg, "EndTimeZone", "calendar",
"CalendarItem");
ewscal_set_timezone (msg, "EndTimeZone", tmp->data);
e_ews_message_end_set_item_field (msg);
@@ -2295,6 +1839,8 @@ convert_vevent_component_to_updatexml (ESoapMessage *msg,
g_slist_free (msdn_locations);
g_slist_free_full (tzds, (GDestroyNotify) e_ews_calendar_time_zone_definition_free);
} else {
+ e_ews_message_replace_server_version (msg, E_EWS_EXCHANGE_2007_SP1);
+
e_ews_message_start_set_item_field (msg, "MeetingTimeZone", "calendar",
"CalendarItem");
ewscal_set_meeting_timezone (msg, tzid_start);
e_ews_message_end_set_item_field (msg);
diff --git a/src/calendar/e-cal-backend-ews-utils.h b/src/calendar/e-cal-backend-ews-utils.h
index d7b654d..3b02228 100644
--- a/src/calendar/e-cal-backend-ews-utils.h
+++ b/src/calendar/e-cal-backend-ews-utils.h
@@ -74,10 +74,8 @@ void e_ews_clean_icalcomponent (icalcomponent *icalcomp);
const gchar *e_cal_backend_ews_tz_util_get_msdn_equivalent (const gchar *ical_tz_location);
const gchar *e_cal_backend_ews_tz_util_get_ical_equivalent (const gchar *msdn_tz_location);
-void e_cal_backend_ews_populate_tz_ical_to_msdn (void);
-void e_cal_backend_ews_populate_tz_msdn_to_ical (void);
-void e_cal_backend_ews_unref_tz_ical_to_msdn (void);
-void e_cal_backend_ews_unref_tz_msdn_to_ical (void);
+void e_cal_backend_ews_populate_windows_zones (void);
+void e_cal_backend_ews_unref_windows_zones (void);
void e_cal_backend_ews_convert_calcomp_to_xml (ESoapMessage *msg, gpointer user_data);
void e_cal_backend_ews_convert_component_to_updatexml (ESoapMessage *msg, gpointer user_data);
diff --git a/src/calendar/e-cal-backend-ews.c b/src/calendar/e-cal-backend-ews.c
index c79447a..0ba3990 100644
--- a/src/calendar/e-cal-backend-ews.c
+++ b/src/calendar/e-cal-backend-ews.c
@@ -4037,8 +4037,7 @@ e_cal_backend_ews_finalize (GObject *object)
g_free (priv);
cbews->priv = NULL;
- e_cal_backend_ews_unref_tz_ical_to_msdn ();
- e_cal_backend_ews_unref_tz_msdn_to_ical ();
+ e_cal_backend_ews_unref_windows_zones ();
G_OBJECT_CLASS (e_cal_backend_ews_parent_class)->finalize (object);
}
@@ -4158,7 +4157,6 @@ e_cal_backend_ews_init (ECalBackendEws *cbews)
cbews, "notify::online",
G_CALLBACK (e_cal_backend_ews_notify_online_cb), NULL);
- e_cal_backend_ews_populate_tz_ical_to_msdn ();
- e_cal_backend_ews_populate_tz_msdn_to_ical ();
+ e_cal_backend_ews_populate_windows_zones ();
}
diff --git a/src/calendar/windowsZones.xml b/src/calendar/windowsZones.xml
new file mode 100644
index 0000000..ce1fdc4
--- /dev/null
+++ b/src/calendar/windowsZones.xml
@@ -0,0 +1,660 @@
+<?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="2013i">
+
+ <!-- (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 America/Shiprock"/>
+ <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="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 -->
+ <mapZone other="E. Europe Standard Time" territory="001" type="Asia/Nicosia"/>
+ <mapZone other="E. Europe Standard Time" territory="CY" type="Asia/Nicosia"/>
+
+ <!-- (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/Simferopol
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/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
Antarctica/South_Pole"/>
+
+ <!-- (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"/>
+
+ <!-- Internal fixes -->
+ <mapZone other="Argentina Standard Time" territory="AR"
type="America/Argentina/Buenos_Aires America/Argentina/Cordoba America/Argentina/Jujuy
America/Argentina/Catamarca America/Argentina/Mendoza"/>
+ <mapZone other="India Standard Time" territory="IN" type="Asia/Kolkata"/>
+ <mapZone other="Nepal Standard Time" territory="NP" type="Asia/Kathmandu"/>
+ <mapZone other="Eastern Standard Time" territory="US"
type="America/Kentucky/Louisville"/>
+ <mapZone other="US Eastern Standard Time" territory="US"
type="America/Indiana/Indianapolis"/>
+ </mapTimezones>
+ </windowsZones>
+</supplementalData>
diff --git a/src/server/e-ews-message.c b/src/server/e-ews-message.c
index b10ef27..3612f84 100644
--- a/src/server/e-ews-message.c
+++ b/src/server/e-ews-message.c
@@ -27,8 +27,41 @@
#include <string.h>
#include <libsoup/soup-uri.h>
+#include <libxml/parser.h>
+#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
+#include <libxml/tree.h>
#include "e-ews-message.h"
+static const gchar *
+convert_server_version_to_string (EEwsServerVersion version)
+{
+ /* server info */
+ switch (version) {
+ /*
+ * If we don't know the server version, let's use the safest possible
+ */
+ case E_EWS_EXCHANGE_UNKNOWN:
+ return "Exchange2007_SP1";
+ case E_EWS_EXCHANGE_2007:
+ return "Exchange2007";
+ case E_EWS_EXCHANGE_2007_SP1:
+ return "Exchange2007_SP1";
+ case E_EWS_EXCHANGE_2010:
+ return "Exchange2010";
+ case E_EWS_EXCHANGE_2010_SP1:
+ return "Exchange2010_SP1";
+ /*
+ * If we don't have support for the latest version, let's use the latest possible
+ */
+ case E_EWS_EXCHANGE_2010_SP2:
+ case E_EWS_EXCHANGE_FUTURE:
+ return "Exchange2010_SP2";
+ }
+
+ return "Exchange2007";
+}
+
ESoapMessage *
e_ews_message_new_with_header (const gchar *uri,
const gchar *impersonate_user,
@@ -41,7 +74,7 @@ e_ews_message_new_with_header (const gchar *uri,
gboolean standard_handlers)
{
ESoapMessage *msg;
- const gchar *server_ver = "Exchange2007";
+ const gchar *server_ver;
EEwsServerVersion version;
msg = e_soap_message_new (
@@ -68,34 +101,7 @@ e_ews_message_new_with_header (const gchar *uri,
else
version = server_version >= minimum_version ? server_version : minimum_version;
- /* server info */
- switch (version) {
- /*
- * If we don't know the server version, let's use the safest possible
- */
- case E_EWS_EXCHANGE_UNKNOWN:
- server_ver = "Exchange2007_SP1";
- break;
- case E_EWS_EXCHANGE_2007:
- server_ver = "Exchange2007";
- break;
- case E_EWS_EXCHANGE_2007_SP1:
- server_ver = "Exchange2007_SP1";
- break;
- case E_EWS_EXCHANGE_2010:
- server_ver = "Exchange2010";
- break;
- case E_EWS_EXCHANGE_2010_SP1:
- server_ver = "Exchange2010_SP1";
- break;
- /*
- * If we don't have support for the latest version, let's use the latest possible
- */
- case E_EWS_EXCHANGE_2010_SP2:
- case E_EWS_EXCHANGE_FUTURE:
- server_ver = "Exchange2010_SP2";
- break;
- }
+ server_ver = convert_server_version_to_string (version);
e_soap_message_start_header (msg);
@@ -279,3 +285,70 @@ e_ews_message_write_extended_distinguished_name (ESoapMessage *msg,
e_soap_message_add_attribute (msg, "PropertyType", prop_type, NULL, NULL);
e_soap_message_end_element (msg); /* ExtendedFieldURI */
}
+
+static xmlXPathObjectPtr
+xpath_eval (xmlXPathContextPtr ctx,
+ const gchar *format,
+ ...)
+{
+ xmlXPathObjectPtr result;
+ va_list args;
+ gchar *expr;
+
+ if (ctx == NULL)
+ return NULL;
+
+ va_start (args, format);
+ expr = g_strdup_vprintf (format, args);
+ va_end (args);
+
+ result = xmlXPathEvalExpression (BAD_CAST expr, ctx);
+ g_free (expr);
+
+ if (result == NULL)
+ return NULL;
+
+ if (result->type == XPATH_NODESET && xmlXPathNodeSetIsEmpty (result->nodesetval)) {
+ xmlXPathFreeObject (result);
+ return NULL;
+ }
+
+ return result;
+}
+
+void
+e_ews_message_replace_server_version (ESoapMessage *msg,
+ EEwsServerVersion version)
+{
+ xmlDocPtr doc;
+ xmlXPathContextPtr xpctx;
+ xmlXPathObjectPtr result;
+ xmlNodeSetPtr nodeset;
+ xmlNodePtr node;
+ const gchar *server_ver;
+
+ doc = e_soap_message_get_xml_doc (msg);
+ xpctx = xmlXPathNewContext (doc);
+
+ xmlXPathRegisterNs (
+ xpctx,
+ BAD_CAST "s",
+ BAD_CAST "http://schemas.xmlsoap.org/soap/envelope/");
+
+ xmlXPathRegisterNs (
+ xpctx,
+ BAD_CAST "t",
+ BAD_CAST "http://schemas.microsoft.com/exchange/services/2006/types");
+
+ result = xpath_eval (xpctx, "/s:Envelope/s:Header/t:RequestServerVersion");
+ if (result != NULL) {
+ server_ver = convert_server_version_to_string (version);
+
+ nodeset = result->nodesetval;
+ node = nodeset->nodeTab[0];
+ xmlSetProp (node, BAD_CAST "Version", BAD_CAST server_ver);
+ }
+
+ xmlXPathFreeObject (result);
+ xmlXPathFreeContext (xpctx);
+}
diff --git a/src/server/e-ews-message.h b/src/server/e-ews-message.h
index 2c5e0c4..aca180d 100644
--- a/src/server/e-ews-message.h
+++ b/src/server/e-ews-message.h
@@ -103,6 +103,9 @@ void e_ews_message_write_extended_distinguished_name
const gchar *name,
const gchar *prop_type);
+void e_ews_message_replace_server_version (ESoapMessage *msg,
+ EEwsServerVersion version);
+
G_END_DECLS
#endif
diff --git a/src/server/e-soap-message.h b/src/server/e-soap-message.h
index 459bca7..d50e4ce 100644
--- a/src/server/e-soap-message.h
+++ b/src/server/e-soap-message.h
@@ -77,6 +77,9 @@ void e_soap_message_start_fault_detail
(ESoapMessage *msg);
void e_soap_message_end_fault_detail (ESoapMessage *msg);
void e_soap_message_start_header (ESoapMessage *msg);
+void e_soap_message_replace_header (ESoapMessage *msg,
+ const gchar *name,
+ const gchar *value);
void e_soap_message_end_header (ESoapMessage *msg);
void e_soap_message_start_header_element
(ESoapMessage *msg,
diff --git a/tests/ews-test-timezones.c b/tests/ews-test-timezones.c
index 2b154be..5fff7a6 100644
--- a/tests/ews-test-timezones.c
+++ b/tests/ews-test-timezones.c
@@ -24,7 +24,7 @@
#include "ews-test-common.h"
-void (* populate_tz_ical_to_msdn) (void);
+void (* populate_windows_zones) (void);
const gchar * (* ical_to_msdn_equivalent) (const gchar *);
void (* convert_calcomp_to_xml) (ESoapMessage *, gpointer);
@@ -278,8 +278,8 @@ int main (int argc,
if (!g_module_symbol (
module,
- "e_cal_backend_ews_populate_tz_ical_to_msdn",
- (gpointer *) &populate_tz_ical_to_msdn)) {
+ "e_cal_backend_ews_populate_windows_zones",
+ (gpointer *) &populate_windows_zones)) {
g_printerr ("\n%s\n", g_module_error ());
goto exit;
}
@@ -305,7 +305,7 @@ int main (int argc,
etds = ews_test_get_test_data_list ();
/* Set handler of debug information */
- populate_tz_ical_to_msdn ();
+ populate_windows_zones ();
builtin_timezones = icaltimezone_get_builtin_timezones ();
for (l = etds; l != NULL; l = l->next) {
@@ -321,7 +321,6 @@ int main (int argc,
g_test_add_data_func (message, etd, test_libical_timezones_compatibility);
g_free (message);
-
message = g_strdup_printf ("/%s/calendar/timezones/time_zones_sync", etd->version);
g_test_add_data_func (message, etd, test_time_zones_sync);
g_free (message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]