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 10433 6bb7dbe6d90c9cd1b5cbea149bb69ff6ee9ef876
parent 10432 ab19fa1cf57fd24dbecb3e89a0b20703f8024a5a
child 10434 66527bcf0a8a5696372ea3d86eb3a2ace5881e26
push id402
push userbugzilla@standard8.plus.com
push dateTue, 13 Mar 2012 21:17:18 +0000
treeherdercomm-beta@d080a8ebf16a [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) {
                         }