Fix bug 873611 - Merge "Fix Timezones with RDATE information" from upstream.,a=philipp
authorPhilipp Kewisch <mozilla@kewis.ch>
Fri, 17 May 2013 21:30:08 +0200
changeset 15539 203edaea8c5a051f7fe1c5baf5afc3051447cb1e
parent 15538 6742cf89cbcd50d6c6aecc1b1da585013eb50f9f
child 15540 568a50beabe994a1c418230194da334ce7346830
push idunknown
push userunknown
push dateunknown
reviewersphilipp
bugs873611
Fix bug 873611 - Merge "Fix Timezones with RDATE information" from upstream.,a=philipp
calendar/base/modules/ical.js
--- a/calendar/base/modules/ical.js
+++ b/calendar/base/modules/ical.js
@@ -3034,22 +3034,27 @@ ICAL.Binary = (function() {
           change.year = time.year;
           change.month = time.month;
           change.day = time.day;
 
           if (time.isDate) {
             change.hour = dtstart.hour;
             change.minute = dtstart.minute;
             change.second = dtstart.second;
+
+            if (dtstart.zone != ICAL.Timezone.utcTimezone) {
+              ICAL.Timezone.adjust_change(change, 0, 0, 0,
+                                              -change.prevUtcOffset);
+            }
           } else {
             change.hour = time.hour;
             change.minute = time.minute;
             change.second = time.second;
 
-            if (time.zone == ICAL.Timezone.utcTimezone) {
+            if (time.zone != ICAL.Timezone.utcTimezone) {
               ICAL.Timezone.adjust_change(change, 0, 0, 0,
                                               -change.prevUtcOffset);
             }
           }
 
           changes.push(change);
         }