Fix bug 577023 - The until date of a repeating event changes from UTC time to floating after Thunderbird is closed and restarted. r=philipp
authorDecathlon <bv1578@gmail.com>
Mon, 11 Jul 2011 02:08:00 +0200
changeset 9197 6bb7dbe6d90c9cd1b5cbea149bb69ff6ee9ef876
parent 9196 ab19fa1cf57fd24dbecb3e89a0b20703f8024a5a
child 9198 66527bcf0a8a5696372ea3d86eb3a2ace5881e26
push id7044
push usermozilla@kewis.ch
push dateTue, 17 Jan 2012 12:12:28 +0000
treeherdercomm-central@6bb7dbe6d90c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilipp
bugs577023
Fix bug 577023 - The until date of a repeating event changes from UTC time to floating after Thunderbird is closed and restarted. r=philipp
calendar/providers/storage/calStorageCalendar.js
--- a/calendar/providers/storage/calStorageCalendar.js
+++ b/calendar/providers/storage/calStorageCalendar.js
@@ -1758,17 +1758,23 @@ calStorageCalendar.prototype = {
                         ritem.type = row.recur_type;
                         if (row.count) {
                             try {
                                 ritem.count = row.count;
                             } catch (exc) {
                             }
                         } else {
                             if (row.end_date) {
-                                ritem.untilDate = newDateTime(row.end_date, "UTC");
+                                let dtstart = item.startDate || item.entryDate;
+                                let allday = dtstart.isDate && dtstart.timezone == "floating";
+                                let untilDate = newDateTime(row.end_date, allday ? "" : "UTC");
+                                if (allday) {
+                                    untilDate.isDate = true;
+                                }
+                                ritem.untilDate = untilDate;
                             } else {
                                 ritem.untilDate = null;
                             }
                         }
                         try {
                             ritem.interval = row.interval;
                         } catch (exc) {
                         }