Fix bug 977097 - Add more aliases for the UTC timezone. r=redDragon,a=philipp SEAMONKEY_2_25b2_BUILD1 SEAMONKEY_2_25b2_RELEASE
authorPhilipp Kewisch <mozilla@kewis.ch>
Thu, 27 Feb 2014 16:31:20 +0100
changeset 17026 1643851618ef17e40b137465ca29922901b7dd7c
parent 17025 14e26bcb0f420a89797d2aa13470b4be21f2b9ce
child 17027 275b33d84faac96e3a4e750dba5b01bb25a0b178
child 17029 549b326bb7f141749cb21b6e1656421ccd4ad7f9
child 17031 6db67a321b189c8937f7fc666ae203d7d389be9a
child 17036 46531be1065ebe885a01632237f2d739cad9d16d
push idunknown
push userunknown
push dateunknown
reviewersredDragon, philipp
bugs977097
Fix bug 977097 - Add more aliases for the UTC timezone. r=redDragon,a=philipp
calendar/base/src/calTimezoneService.js
--- a/calendar/base/src/calTimezoneService.js
+++ b/calendar/base/src/calTimezoneService.js
@@ -90,19 +90,27 @@ calTimezoneService.prototype = {
     get UTC() {
         if (!this.mUTC) {
             if (cal.getPrefSafe("calendar.icaljs", false)) {
                 this.mUTC = new calICALJSTimezone(ICAL.Timezone.utcTimezone);
             } else {
                 this.mUTC = new calLibicalTimezone("UTC", null, "", "");
                 this.mUTC.mUTC = true;
             }
-            this.mTimezoneCache.UTC = this.mUTC;
-            this.mTimezoneCache.utc = this.mUTC;
-            this.mTimezoneCache.Z = this.mUTC;
+
+            // These UTC aliases are taken from wikipedia, included in case
+            // other clients make use of them without specifying a definition.
+            const utcAliases = ["UTC", "utc", "Z", "Etc/GMT", "Etc/GMT+0",
+                                "Etc/UCT", "Etc/Unversal", "Etc/UTC",
+                                "Etc/Zulu", "GMT", "GMT+0", "GMT0",
+                                "Greenwich", "UCT", "Universal", "Zulu"];
+
+            for (let zone of utcAliases) {
+                this.mTimezoneCache[zone] = this.mUTC;
+            }
         }
 
         return this.mUTC;
     },
 
     get floating() {
         if (!this.mFloating) {
             if (cal.getPrefSafe("calendar.icaljs", false)) {