Bug 1408662 - Move date/time/timezone related functions into calDateTimeUtils.jsm - automatic changes. r=MakeMyDay
authorPhilipp Kewisch <mozilla@kewis.ch>
Sat, 14 Oct 2017 15:33:20 +0200
changeset 30044 18938fc0dd706992c6fd9fec8baddee302b2cd45
parent 30043 015d6cb840c4a0ed8db392a077aab10c2be6d0cd
child 30045 ec9afb3329ab60924e34b4c0460b594d1a5f8474
push id2108
push userclokep@gmail.com
push dateMon, 22 Jan 2018 17:53:55 +0000
treeherdercomm-beta@c44930d8ad9b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMakeMyDay
bugs1408662
Bug 1408662 - Move date/time/timezone related functions into calDateTimeUtils.jsm - automatic changes. r=MakeMyDay MozReview-Commit-ID: CbFO8nxatLy
calendar/base/content/agenda-listbox.js
calendar/base/content/agenda-listbox.xml
calendar/base/content/calendar-base-view.xml
calendar/base/content/calendar-clipboard.js
calendar/base/content/calendar-common-sets.js
calendar/base/content/calendar-dnd-listener.js
calendar/base/content/calendar-extract.js
calendar/base/content/calendar-invitations-manager.js
calendar/base/content/calendar-item-bindings.xml
calendar/base/content/calendar-item-editing.js
calendar/base/content/calendar-month-view.xml
calendar/base/content/calendar-multiday-view.xml
calendar/base/content/calendar-task-tree.xml
calendar/base/content/calendar-task-view.js
calendar/base/content/calendar-unifinder.js
calendar/base/content/calendar-views.js
calendar/base/content/calendar-views.xml
calendar/base/content/dialogs/calendar-alarm-dialog.js
calendar/base/content/dialogs/calendar-dialog-utils.js
calendar/base/content/dialogs/calendar-event-dialog-attendees.js
calendar/base/content/dialogs/calendar-event-dialog-attendees.xml
calendar/base/content/dialogs/calendar-event-dialog-freebusy.xml
calendar/base/content/dialogs/calendar-event-dialog-recurrence-preview.xml
calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
calendar/base/content/dialogs/calendar-event-dialog-reminder.js
calendar/base/content/dialogs/calendar-event-dialog-timezone.js
calendar/base/content/dialogs/calendar-print-dialog.js
calendar/base/content/dialogs/calendar-summary-dialog.js
calendar/base/content/preferences/general.js
calendar/base/content/today-pane.js
calendar/base/content/today-pane.xul
calendar/base/content/widgets/calendar-alarm-widget.xml
calendar/base/content/widgets/calendar-widgets.xml
calendar/base/content/widgets/minimonth.xml
calendar/base/modules/calAlarmUtils.jsm
calendar/base/modules/calItipUtils.jsm
calendar/base/modules/calPrintUtils.jsm
calendar/base/modules/calProviderUtils.jsm
calendar/base/modules/calRecurrenceUtils.jsm
calendar/base/modules/calUtils.jsm
calendar/base/src/calAlarm.js
calendar/base/src/calAlarmService.js
calendar/base/src/calDateTimeFormatter.js
calendar/base/src/calDeletedItems.js
calendar/base/src/calFilter.js
calendar/base/src/calItemBase.js
calendar/base/src/calRecurrenceInfo.js
calendar/base/src/calTimezoneService.js
calendar/base/src/calTodo.js
calendar/base/src/calUtils.js
calendar/import-export/calHtmlExport.js
calendar/import-export/calMonthGridPrinter.js
calendar/import-export/calOutlookCSVImportExport.js
calendar/import-export/calWeekPrinter.js
calendar/lightning/content/lightning-item-iframe.js
calendar/lightning/content/messenger-overlay-sidebar.js
calendar/lightning/content/messenger-overlay-sidebar.xul
calendar/lightning/modules/ltnInvitationUtils.jsm
calendar/providers/caldav/calDavCalendar.js
calendar/providers/gdata/components/calGoogleCalendar.js
calendar/providers/gdata/content/gdata-calendar-event-dialog.js
calendar/providers/gdata/modules/gdataSession.jsm
calendar/providers/gdata/modules/gdataUtils.jsm
calendar/providers/memory/calMemoryCalendar.js
calendar/providers/storage/calStorageHelpers.jsm
calendar/providers/storage/calStorageUpgrade.jsm
calendar/providers/wcap/calWcapCalendarItems.js
calendar/providers/wcap/calWcapSession.js
calendar/providers/wcap/calWcapUtils.js
calendar/resources/content/datetimepickers/datetimepickers.xml
calendar/resources/content/mouseoverPreviews.js
calendar/test/mozmill/cal-recurrence/testWeeklyUntilRecurrence.js
calendar/test/mozmill/recurrenceRotated/testWeeklyUntilRecurrence.js
calendar/test/mozmill/recurrenceRotated/testWeeklyWithExceptionRecurrence.js
calendar/test/mozmill/shared-modules/test-calendar-utils.js
calendar/test/mozmill/testTodayPane.js
calendar/test/mozmill/views/testMonthView.js
calendar/test/unit/head_consts.js
calendar/test/unit/test_alarmservice.js
calendar/test/unit/test_alarmutils.js
calendar/test/unit/test_bug272411.js
calendar/test/unit/test_calmgr.js
calendar/test/unit/test_datetime.js
calendar/test/unit/test_datetime_before_1970.js
calendar/test/unit/test_datetimeformatter.js
calendar/test/unit/test_deleted_items.js
calendar/test/unit/test_gdata_provider.js
calendar/test/unit/test_items.js
calendar/test/unit/test_recur.js
calendar/test/unit/test_rfc3339_parser.js
calendar/test/unit/test_utils.js
--- a/calendar/base/content/agenda-listbox.js
+++ b/calendar/base/content/agenda-listbox.js
@@ -510,17 +510,17 @@ agendaListbox.deleteItemsFromCalendar = 
  * matches
  *
  * @param aItem         The item to compare.
  * @param aCompItem     The item to compare with.
  * @return              True, if the items match with the above noted criteria.
  */
 agendaListbox.isSameEvent = function(aItem, aCompItem) {
     return aItem.id == aCompItem.id &&
-           aItem[cal.calGetStartDateProp(aItem)].compare(aCompItem[cal.calGetStartDateProp(aCompItem)]) == 0;
+           aItem[cal.dtz.startDateProp(aItem)].compare(aCompItem[cal.dtz.startDateProp(aCompItem)]) == 0;
 };
 
 /**
  * Checks if the currently selected node in the listbox is an Event item (not a
  * period item).
  *
  * @return              True, if the node is not a period item.
  */
@@ -702,33 +702,33 @@ agendaListbox.setupCalendar = function()
  * Usually called at midnight to update the agenda pane. Also retrieves the
  * items from the calendar.
  *
  * @see #refreshCalendarQuery
  * @param newDate       The first date to show if the agenda pane doesn't show
  *                        today.
  */
 agendaListbox.refreshPeriodDates = function(newDate) {
-    this.kDefaultTimezone = cal.calendarDefaultTimezone();
+    this.kDefaultTimezone = cal.dtz.defaultTimezone;
     // Today: now until midnight of tonight
     let oldshowstoday = this.showstoday;
     this.showstoday = this.showsToday(newDate);
     if ((this.showstoday) && (!oldshowstoday)) {
         this.addPeriodListItem(this.tomorrow, "tomorrow-header");
         this.addPeriodListItem(this.soon, "nextweek-header");
     } else if (!this.showstoday) {
         this.removePeriodListItem(this.tomorrow);
         this.removePeriodListItem(this.soon);
     }
     newDate.isDate = true;
     for (let i = 0; i < this.periods.length; i++) {
         let curPeriod = this.periods[i];
         newDate.hour = newDate.minute = newDate.second = 0;
         if (i == 0 && this.showstoday) {
-            curPeriod.start = cal.now();
+            curPeriod.start = cal.dtz.now();
         } else {
             curPeriod.start = newDate.clone();
         }
         newDate.day += curPeriod.duration;
         curPeriod.end = newDate.clone();
         curPeriod.listItem.setItem(curPeriod, this.showstoday);
     }
     this.refreshCalendarQuery();
@@ -750,17 +750,17 @@ agendaListbox.addListener = function(aLi
  * @param aStartDate    (optional) The day to check if its "today".
  * @return              Returns true if today is shown.
  */
 agendaListbox.showsToday = function(aStartDate) {
     let lstart = aStartDate;
     if (!lstart) {
         lstart = this.today.start;
     }
-    let lshowsToday = cal.sameDay(cal.now(), lstart);
+    let lshowsToday = cal.dtz.sameDay(cal.dtz.now(), lstart);
     if (lshowsToday) {
         this.periods = [this.today, this.tomorrow, this.soon];
     } else {
         this.periods = [this.today];
     }
     return lshowsToday;
 };
 
@@ -991,17 +991,17 @@ agendaListbox.calendarObserver.onDefault
  * Updates the "Upcoming" section of today pane when preference soondays changes
  **/
 agendaListbox.updateSoonSection = function() {
     this.soon.duration = this.soonDays;
     this.soon.open = true;
     let soonHeader = document.getElementById("nextweek-header");
     if (soonHeader) {
         soonHeader.setItem(this.soon, true);
-        agendaListbox.refreshPeriodDates(cal.now());
+        agendaListbox.refreshPeriodDates(cal.dtz.now());
     }
 };
 
 /**
  * Updates the event considered "current". This goes through all "today" items
  * and sets the "current" attribute on all list items that are currently
  * occurring.
  *
@@ -1010,17 +1010,17 @@ agendaListbox.updateSoonSection = functi
 function setCurrentEvent() {
     if (!agendaListbox.showsToday() || !agendaListbox.today.open) {
         return;
     }
 
     let msScheduleTime = -1;
     let complistItem = agendaListbox.tomorrow.listItem.previousSibling;
     let removelist = [];
-    let anow = cal.now();
+    let anow = cal.dtz.now();
     let msuntillend = 0;
     let msuntillstart = 0;
     let leaveloop;
     do {
         leaveloop = !agendaListbox.isEventListItem(complistItem);
         if (!leaveloop) {
             msuntillstart = complistItem.occurrence.startDate
                                         .getInTimezone(agendaListbox.kDefaultTimezone)
--- a/calendar/base/content/agenda-listbox.xml
+++ b/calendar/base/content/agenda-listbox.xml
@@ -120,20 +120,20 @@
         <parameter name="aPeriod"/>
         <body><![CDATA[
             this.mOccurrence = aOccurrence;
             this.mAllDayItem.occurrence = aOccurrence;
             let dateFormatter = cal.getDateFormatter();
             let periodStartDate = aPeriod.start.clone();
             periodStartDate.isDate = true;
             let periodEndDate = aPeriod.end;
-            let startDate = this.mOccurrence[cal.calGetStartDateProp(this.mOccurrence)]
-                                .getInTimezone(cal.calendarDefaultTimezone());
-            let endDate = this.mOccurrence[cal.calGetEndDateProp(this.mOccurrence)]
-                              .getInTimezone(cal.calendarDefaultTimezone());
+            let startDate = this.mOccurrence[cal.dtz.startDateProp(this.mOccurrence)]
+                                .getInTimezone(cal.dtz.defaultTimezone);
+            let endDate = this.mOccurrence[cal.dtz.endDateProp(this.mOccurrence)]
+                              .getInTimezone(cal.dtz.defaultTimezone);
             let endPreviousDay = endDate.clone();
             endPreviousDay.day--;
             // Show items's date for long periods but also for "Upcoming"
             // period with one day duration.
             let showDate = aPeriod.multiday || aPeriod.duration > 1;
 
             let date = "";
             let iconType = "";
@@ -206,20 +206,20 @@
             this.setAttribute("status", aItem.status);
             let dateFormatter = Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
                                           .getService(Components.interfaces.calIDateTimeFormatter);
 
             let periodStartDate = aPeriod.start.clone();
             periodStartDate.isDate = true;
             let periodEndDate = aPeriod.end.clone();
             periodEndDate.day--;
-            let start = this.mOccurrence[cal.calGetStartDateProp(this.mOccurrence)]
-                            .getInTimezone(cal.calendarDefaultTimezone());
-            let end = this.mOccurrence[cal.calGetEndDateProp(this.mOccurrence)]
-                          .getInTimezone(cal.calendarDefaultTimezone());
+            let start = this.mOccurrence[cal.dtz.startDateProp(this.mOccurrence)]
+                            .getInTimezone(cal.dtz.defaultTimezone);
+            let end = this.mOccurrence[cal.dtz.endDateProp(this.mOccurrence)]
+                          .getInTimezone(cal.dtz.defaultTimezone);
             let startDate = start.clone();
             startDate.isDate = true;
             let endDate = end.clone();
             endDate.isDate = true;
             let endAtMidnight = (end.hour == 0 && end.minute == 0);
             if (endAtMidnight) {
                 endDate.day--;
             }
--- a/calendar/base/content/calendar-base-view.xml
+++ b/calendar/base/content/calendar-base-view.xml
@@ -236,17 +236,17 @@
                                   .getAttribute("checked") == "true");
           this.tasksInView = (document.getElementById(kTasksInViewCommand)
                                   .getAttribute("checked") == "true");
           this.rotated = (document.getElementById(kOrientation)
                                   .getAttribute("checked") == "true");
           this.showCompleted = (document.getElementById(kShowCompleted)
                                   .getAttribute("checked") == "true");
 
-          this.mTimezone = cal.calendarDefaultTimezone();
+          this.mTimezone = cal.dtz.defaultTimezone;
           let alarmService = Components.classes["@mozilla.org/calendar/alarm-service;1"]
                                        .getService(Components.interfaces.calIAlarmService);
           alarmService.addObserver(this.mObserver);
           this.setAttribute("type", this.type);
           this.mResizeHandler = () => {
               this.onResize(this);
           };
           this.viewBroadcaster.addEventListener(this.getAttribute("type") + "viewresized", this.mResizeHandler, true);
@@ -412,17 +412,17 @@
             for (let i = 0; i < labeldayboxkids.length; i++) {
                 labeldayboxkids[i].shortWeekNames = useShortNames;
             }
         ]]></body>
       </method>
 
       <method name="today">
         <body><![CDATA[
-            let date = cal.jsDateToDateTime(new Date()).getInTimezone(this.mTimezone);
+            let date = cal.dtz.jsDateToDateTime(new Date()).getInTimezone(this.mTimezone);
             date.isDate = true;
             return date;
         ]]></body>
       </method>
 
       <method name="isVisible">
         <body><![CDATA[
             return (this.nodeName == currentView().nodeName);
@@ -628,17 +628,17 @@
                 case "calendar.week.d2tuesdaysoff":
                 case "calendar.week.d3wednesdaysoff":
                 case "calendar.week.d4thursdaysoff":
                 case "calendar.week.d5fridaysoff":
                 case "calendar.week.d6saturdaysoff":
                     this.updateDaysOffPrefs();
                     break;
                 case "calendar.timezone.local":
-                    this.timezone = cal.calendarDefaultTimezone();
+                    this.timezone = cal.dtz.defaultTimezone;
                     this.refreshView();
                     break;
                 case "calendar.alarms.indicator.show":
                     // Break here to ensure the view is refreshed
                     break;
                 case "calendar.week.start":
                     this.weekStartOffset = aSubject.getIntPref(aPreference);
                     break;
--- a/calendar/base/content/calendar-clipboard.js
+++ b/calendar/base/content/calendar-clipboard.js
@@ -196,17 +196,17 @@ function pasteFromClipboard() {
             }
             let firstDate = currentView().selectedDay;
 
             let offset = null;
             if (earliestDate) {
                 // Timezones and DT/DST time may differ between the earliest item
                 // and the selected day. Determine the offset between the
                 // earliestDate in local time and the selected day in whole days.
-                earliestDate = earliestDate.getInTimezone(cal.calendarDefaultTimezone());
+                earliestDate = earliestDate.getInTimezone(cal.dtz.defaultTimezone);
                 earliestDate.isDate = true;
                 offset = firstDate.subtractDate(earliestDate);
                 let deltaDST = firstDate.timezoneOffset - earliestDate.timezoneOffset;
                 offset.inSeconds += deltaDST;
             }
 
             startBatchTransaction();
             for (let item of items) {
--- a/calendar/base/content/calendar-common-sets.js
+++ b/calendar/base/content/calendar-common-sets.js
@@ -270,22 +270,22 @@ var calendarController = {
         return false;
     },
 
     doCommand: function(aCommand) {
         switch (aCommand) {
             // Common Commands
             case "calendar_new_event_command":
                 createEventWithDialog(getSelectedCalendar(),
-                                      cal.getDefaultStartDate(currentView().selectedDay));
+                                      cal.dtz.getDefaultStartDate(currentView().selectedDay));
                 break;
             case "calendar_new_event_context_command": {
                 let newStart = currentView().selectedDateTime;
                 if (!newStart) {
-                    newStart = cal.getDefaultStartDate(currentView().selectedDay);
+                    newStart = cal.dtz.getDefaultStartDate(currentView().selectedDay);
                 }
                 createEventWithDialog(getSelectedCalendar(), newStart,
                                       null, null, null,
                                       newStart.isDate == true);
                 break;
             }
             case "calendar_modify_event_command":
                 editSelectedEvents();
@@ -323,41 +323,41 @@ var calendarController = {
                         deleteSelectedEvents();
                     }
                 }
                 break;
             }
             case "calendar_new_todo_command":
                 createTodoWithDialog(getSelectedCalendar(),
                                      null, null, null,
-                                     cal.getDefaultStartDate(currentView().selectedDay));
+                                     cal.dtz.getDefaultStartDate(currentView().selectedDay));
                 break;
             case "calendar_new_todo_context_command": {
                 let initialDate = currentView().selectedDateTime;
                 if (!initialDate || initialDate.isDate) {
-                    initialDate = cal.getDefaultStartDate(currentView().selectedDay);
+                    initialDate = cal.dtz.getDefaultStartDate(currentView().selectedDay);
                 }
                 createTodoWithDialog(getSelectedCalendar(),
                                      null, null, null,
                                      initialDate);
                 break;
             }
             case "calendar_new_todo_todaypane_command":
                 createTodoWithDialog(getSelectedCalendar(),
                                      null, null, null,
-                                     cal.getDefaultStartDate(agendaListbox.today.start));
+                                     cal.dtz.getDefaultStartDate(agendaListbox.today.start));
                 break;
             case "calendar_delete_todo_command":
                 deleteToDoCommand();
                 break;
             case "calendar_modify_todo_command":
-                modifyTaskFromContext(null, cal.getDefaultStartDate(currentView().selectedDay));
+                modifyTaskFromContext(null, cal.dtz.getDefaultStartDate(currentView().selectedDay));
                 break;
             case "calendar_modify_todo_todaypane_command":
-                modifyTaskFromContext(null, cal.getDefaultStartDate(agendaListbox.today.start));
+                modifyTaskFromContext(null, cal.dtz.getDefaultStartDate(agendaListbox.today.start));
                 break;
 
             case "calendar_new_calendar_command":
                 cal.openCalendarWizard(window);
                 break;
             case "calendar_edit_calendar_command":
                 cal.openCalendarProperties(window, getSelectedCalendar());
                 break;
@@ -843,17 +843,17 @@ function setupContextItemType(event, ite
  *
  * XXX This function is misplaced, should go to calendar-views.js or a minimonth
  * specific js file.
  *
  * @param aNewDate      The new date as a JSDate.
  */
 function minimonthPick(aNewDate) {
     if (gCurrentMode == "calendar" || gCurrentMode == "task") {
-        let cdt = cal.jsDateToDateTime(aNewDate, currentView().timezone);
+        let cdt = cal.dtz.jsDateToDateTime(aNewDate, currentView().timezone);
         cdt.isDate = true;
         currentView().goToDay(cdt);
 
         // update date filter for task tree
         let tree = document.getElementById("calendar-task-tree");
         tree.updateFilter();
     }
 }
--- a/calendar/base/content/calendar-dnd-listener.js
+++ b/calendar/base/content/calendar-dnd-listener.js
@@ -19,17 +19,17 @@ var itemConversion = {
      */
     calendarItemFromMessage: function iC_calendarItemFromMessage(aItem, aMsgHdr) {
         let msgFolder = aMsgHdr.folder;
         let msgUri = msgFolder.getUriForMsg(aMsgHdr);
 
         aItem.calendar = getSelectedCalendar();
         aItem.title = aMsgHdr.mime2DecodedSubject;
 
-        cal.setDefaultStartEndHour(aItem);
+        cal.dtz.setDefaultStartEndHour(aItem);
         cal.alarms.setDefaultValues(aItem);
 
         let messenger = Components.classes["@mozilla.org/messenger;1"]
                                   .createInstance(Components.interfaces.nsIMessenger);
         let streamListener = Components.classes["@mozilla.org/network/sync-stream-listener;1"]
                                        .createInstance(Components.interfaces.nsISyncStreamListener);
         messenger.messageServiceFromURI(msgUri).streamMessage(msgUri,
                                                               streamListener,
@@ -143,17 +143,17 @@ var itemConversion = {
 
         // Dates and alarms
         item.startDate = aTask.entryDate;
         if (!item.startDate) {
             if (aTask.dueDate) {
                 item.startDate = aTask.dueDate.clone();
                 item.startDate.minute -= Preferences.get("calendar.event.defaultlength", 60);
             } else {
-                item.startDate = cal.getDefaultStartDate();
+                item.startDate = cal.dtz.getDefaultStartDate();
             }
         }
 
         item.endDate = aTask.dueDate;
         if (!item.endDate) {
             // Make the event be the default event length if no due date was
             // specified.
             item.endDate = item.startDate.clone();
--- a/calendar/base/content/calendar-extract.js
+++ b/calendar/base/content/calendar-extract.js
@@ -100,17 +100,17 @@ var calendarExtract = {
             extractor = new Extractor(locale, dayStart, false);
         }
 
         let item;
         item = isEvent ? cal.createEvent() : cal.createTodo();
         item.title = message.mime2DecodedSubject;
         item.calendar = getSelectedCalendar();
         item.setProperty("DESCRIPTION", content);
-        cal.setDefaultStartEndHour(item);
+        cal.dtz.setDefaultStartEndHour(item);
         cal.alarms.setDefaultValues(item);
         let sel = GetMessagePaneFrame().getSelection();
         // Thunderbird Conversations might be installed
         if (sel === null) {
             try {
                 sel = document.getElementById("multimessage")
                               .contentDocument.querySelector(".iframe-container iframe")
                               .contentDocument.getSelection();
@@ -164,17 +164,17 @@ var calendarExtract = {
                 }
                 if (endGuess.hour != null) {
                     item.endDate.hour = endGuess.hour;
                 }
                 if (endGuess.minute != null) {
                     item.endDate.minute = endGuess.minute;
                 }
             } else {
-                let dtz = cal.calendarDefaultTimezone();
+                let dtz = cal.dtz.defaultTimezone;
                 let dueDate = new Date();
                 // set default
                 dueDate.setHours(0);
                 dueDate.setMinutes(0);
                 dueDate.setSeconds(0);
 
                 if (endGuess.year != null) {
                     dueDate.setYear(endGuess.year);
@@ -187,19 +187,19 @@ var calendarExtract = {
                 }
                 if (endGuess.hour != null) {
                     dueDate.setHours(endGuess.hour);
                 }
                 if (endGuess.minute != null) {
                     dueDate.setMinutes(endGuess.minute);
                 }
 
-                cal.setItemProperty(item, "entryDate", cal.jsDateToDateTime(date, dtz));
+                cal.setItemProperty(item, "entryDate", cal.dtz.jsDateToDateTime(date, dtz));
                 if (endGuess.year != null) {
-                    cal.setItemProperty(item, "dueDate", cal.jsDateToDateTime(dueDate, dtz));
+                    cal.setItemProperty(item, "dueDate", cal.dtz.jsDateToDateTime(dueDate, dtz));
                 }
             }
 
             // if time not guessed set allday for events
             if (allDay) {
                 createEventWithDialog(null, null, null, null, item, true);
             } else {
                 createEventWithDialog(null, null, null, null, item);
--- a/calendar/base/content/calendar-invitations-manager.js
+++ b/calendar/base/content/calendar-invitations-manager.js
@@ -374,17 +374,17 @@ InvitationsManager.prototype = {
 
     /**
      * Helper function to create a start date to search from. This date is the
      * current time with hour/minute/second set to zero.
      *
      * @return      Potential start date.
      */
     getStartDate: function() {
-        let date = cal.now();
+        let date = cal.dtz.now();
         date.second = 0;
         date.minute = 0;
         date.hour = 0;
         return date;
     },
 
     /**
      * Updates the start date for the invitations manager to the date returned
@@ -410,12 +410,12 @@ InvitationsManager.prototype = {
      * @param item      The item to check
      * @return          A boolean indicating if the item is a valid invitation.
      */
     validateItem: function(item) {
         if (item.calendar instanceof Components.interfaces.calISchedulingSupport &&
             !item.calendar.isInvitation(item)) {
             return false; // exclude if organizer has invited himself
         }
-        let start = item[cal.calGetStartDateProp(item)] || item[cal.calGetEndDateProp(item)];
+        let start = item[cal.dtz.startDateProp(item)] || item[cal.dtz.endDateProp(item)];
         return cal.isOpenInvitation(item) && start.compare(this.mStartDate) >= 0;
     }
 };
--- a/calendar/base/content/calendar-item-bindings.xml
+++ b/calendar/base/content/calendar-item-bindings.xml
@@ -52,43 +52,43 @@
             return mItem;
         ]]></getter>
         <setter><![CDATA[
             this.mItem = val;
             let headerLabel = document.getAnonymousElementByAttribute(this, "anonid", "item-datetime-label");
             let itemDateTimeLabel = document.getAnonymousElementByAttribute(this, "anonid", "item-datetime-value");
             let date;
             if (this.mode == "start") {
-                date = this.mItem[cal.calGetStartDateProp(this.mItem)];
+                date = this.mItem[cal.dtz.startDateProp(this.mItem)];
                 if (date) {
                     let label;
                     if (cal.isToDo(this.mItem)) {
                         label = this.getAttribute("taskStartLabel");
                     } else {
                         label = this.getAttribute("eventStartLabel");
                     }
                     headerLabel.value = label;
                 }
             } else {
-                date = this.mItem[cal.calGetEndDateProp(this.mItem)];
+                date = this.mItem[cal.dtz.endDateProp(this.mItem)];
                 if (date) {
                     let label;
                     if (cal.isToDo(this.mItem)) {
                         label = this.getAttribute("taskDueLabel");
                     } else {
                         label = this.getAttribute("eventEndLabel");
                     }
                     headerLabel.value = label;
                 }
             }
             let hideLabels = (date == null);
             if (hideLabels) {
                 this.setAttribute("hidden", "true");
             } else {
-                const kDefaultTimezone = cal.calendarDefaultTimezone();
+                const kDefaultTimezone = cal.dtz.defaultTimezone;
                 let localTime = date.getInTimezone(kDefaultTimezone);
                 let formatter = cal.getDateFormatter();
                 itemDateTimeLabel.value = formatter.formatDateTime(localTime);
                 if (!date.timezone.isFloating && date.timezone.tzid != kDefaultTimezone.tzid) {
                     // we additionally display the original datetime with timezone
                     let orgTime = cal.calGetString("calendar", "datetimeWithTimezone", [
                         formatter.formatDateTime(date),
                         date.timezone.tzid
--- a/calendar/base/content/calendar-item-editing.js
+++ b/calendar/base/content/calendar-item-editing.js
@@ -29,78 +29,78 @@ function disposeJob(job) {
  * @param aCalendar     (optional) The calendar to apply.
  * @param aStartDate    (optional) The start date to set.
  * @param aEndDate      (optional) The end date/due date to set.
  * @param aInitialDate  (optional) The reference date for the date pickers
  * @param aForceAllday  (optional) Force the event/task to be an allday item.
  */
 function setDefaultItemValues(aItem, aCalendar=null, aStartDate=null, aEndDate=null, aInitialDate=null, aForceAllday=false) {
     function endOfDay(aDate) {
-        let eod = aDate ? aDate.clone() : cal.now();
+        let eod = aDate ? aDate.clone() : cal.dtz.now();
         eod.hour = Preferences.get("calendar.view.dayendhour", 19);
         eod.minute = 0;
         eod.second = 0;
         return eod;
     }
     function startOfDay(aDate) {
-        let sod = aDate ? aDate.clone() : cal.now();
+        let sod = aDate ? aDate.clone() : cal.dtz.now();
         sod.hour = Preferences.get("calendar.view.daystarthour", 8);
         sod.minute = 0;
         sod.second = 0;
         return sod;
     }
 
-    let initialDate = aInitialDate ? aInitialDate.clone() : cal.now();
+    let initialDate = aInitialDate ? aInitialDate.clone() : cal.dtz.now();
     initialDate.isDate = true;
 
     if (cal.isEvent(aItem)) {
         if (aStartDate) {
             aItem.startDate = aStartDate.clone();
             if (aStartDate.isDate && !aForceAllday) {
                 // This is a special case where the date is specified, but the
                 // time is not. To take care, we setup up the time to our
                 // default event start time.
-                aItem.startDate = cal.getDefaultStartDate(aItem.startDate);
+                aItem.startDate = cal.dtz.getDefaultStartDate(aItem.startDate);
             } else if (aForceAllday) {
                 // If the event should be forced to be allday, then don't set up
                 // any default hours and directly make it allday.
                 aItem.startDate.isDate = true;
-                aItem.startDate.timezone = cal.floating();
+                aItem.startDate.timezone = cal.dtz.floating;
             }
         } else {
             // If no start date was passed, then default to the next full hour
             // of today, but with the date of the selected day
-            aItem.startDate = cal.getDefaultStartDate(initialDate);
+            aItem.startDate = cal.dtz.getDefaultStartDate(initialDate);
         }
 
         if (aEndDate) {
             aItem.endDate = aEndDate.clone();
             if (aForceAllday) {
                 // XXX it is currently not specified, how callers that force all
                 // day should pass the end date. Right now, they should make
                 // sure that the end date is 00:00:00 of the day after.
                 aItem.endDate.isDate = true;
-                aItem.endDate.timezone = cal.floating();
+                aItem.endDate.timezone = cal.dtz.floating;
             }
         } else {
             aItem.endDate = aItem.startDate.clone();
             if (aForceAllday) {
                 // All day events need to go to the beginning of the next day.
                 aItem.endDate.day++;
             } else {
                 // If the event is not all day, then add the default event
                 // length.
                 aItem.endDate.minute += Preferences.get("calendar.event.defaultlength", 60);
             }
         }
 
         // Free/busy status is only valid for events, must not be set for tasks.
         aItem.setProperty("TRANSP", cal.getEventDefaultTransparency(aForceAllday));
     } else if (cal.isToDo(aItem)) {
-        let now = cal.now();
+        let now = cal.dtz.now();
         let initDate = initialDate ? initialDate.clone() : now;
         initDate.isDate = false;
         initDate.hour = now.hour;
         initDate.minute = now.minute;
         initDate.second = now.second;
 
         if (aStartDate) {
             aItem.entryDate = aStartDate.clone();
@@ -448,17 +448,17 @@ function openEventDialog(calendarItem, c
 
     // Setup the window arguments
     let args = {};
     args.calendarEvent = calendarItem;
     args.calendar = calendar;
     args.mode = mode;
     args.onOk = callback;
     args.job = job;
-    args.initialStartDateValue = initialDate || cal.getDefaultStartDate();
+    args.initialStartDateValue = initialDate || cal.dtz.getDefaultStartDate();
     args.counterProposal = counterProposal;
     args.inTab = Preferences.get("calendar.item.editInTab", false);
     args.useNewItemUI = Preferences.get("calendar.item.useNewItemUI", false);
 
     // this will be called if file->new has been selected from within the dialog
     args.onNewEvent = function(opcalendar) {
         createEventWithDialog(opcalendar, null, null);
     };
--- a/calendar/base/content/calendar-month-view.xml
+++ b/calendar/base/content/calendar-month-view.xml
@@ -81,18 +81,18 @@
             cal.ASSERT(!this.mOccurrence, "Code changes needed to set the occurrence twice", true);
             this.mOccurrence = val;
             if (cal.isEvent(val)) {
                 if (!val.startDate.isDate) {
                     let label = document.getAnonymousElementByAttribute(this, "anonid", "item-label");
                     let formatter = Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
                                               .getService(Components.interfaces.calIDateTimeFormatter);
                     let timezone = this.calendarView ? this.calendarView.mTimezone
-                                                     : cal.calendarDefaultTimezone();
-                    let parentDate = cal.ensureDateTime(this.parentBox.date);
+                                                     : cal.dtz.defaultTimezone;
+                    let parentDate = cal.dtz.ensureDateTime(this.parentBox.date);
                     let startTime = val.startDate.getInTimezone(timezone);
                     let endTime = val.endDate.getInTimezone(timezone);
                     let nextDay = parentDate.clone();
                     nextDay.day++;
                     let comp = endTime.compare(nextDay);
                     if (startTime.compare(parentDate) == -1) {
                         if (comp == 1) {
                             label.value = "↔";
@@ -290,18 +290,18 @@
       <method name="onDropItem">
         <parameter name="aItem"/>
         <body><![CDATA[
             // When item's timezone is different than the default one, the
             // item might get moved on a day different than the drop day.
             // Changing the drop day allows to compensate a possible difference.
 
             // Figure out if the timezones cause a days difference.
-            let start = (aItem[cal.calGetStartDateProp(aItem)] ||
-                         aItem[cal.calGetEndDateProp(aItem)]).clone();
+            let start = (aItem[cal.dtz.startDateProp(aItem)] ||
+                         aItem[cal.dtz.endDateProp(aItem)]).clone();
             let dayboxDate = this.mDate.clone();
             if (start.timezone != dayboxDate.timezone) {
                 let startInDefaultTz = start.clone().getInTimezone(dayboxDate.timezone);
                 start.isDate = true;
                 startInDefaultTz.isDate = true;
                 startInDefaultTz.timezone = start.timezone;
                 let dayDiff = start.subtractDate(startInDefaultTz);
                 // Change the day where to drop the item.
@@ -605,17 +605,17 @@
             }
             this.fireEvent("dayselect", realVal);
             return val;
         ]]></setter>
       </property>
 
       <property name="selectedDateTime">
         <getter><![CDATA[
-            return cal.getDefaultStartDate(this.selectedDay);
+            return cal.dtz.getDefaultStartDate(this.selectedDay);
         ]]></getter>
         <setter><![CDATA[
             this.mClickedTime = val;
         ]]></setter>
       </property>
 
       <method name="showDate">
         <parameter name="aDate"/>
--- a/calendar/base/content/calendar-multiday-view.xml
+++ b/calendar/base/content/calendar-multiday-view.xml
@@ -142,17 +142,17 @@
                 // calculate duration pixel as the difference between
                 // start pixel and end pixel to avoid rounding errors.
                 let startPix = Math.round(theMin * this.mPixPerMin);
                 let endPix = Math.round((theMin + dur) * this.mPixPerMin);
                 let durPix = endPix - startPix;
                 let box;
                 if (dur == 60) {
                     jsTime.setHours(theHour, 0, 0);
-                    timeString = timeFormatter.formatTime(cal.jsDateToDateTime(jsTime, cal.floating()));
+                    timeString = timeFormatter.formatTime(cal.dtz.jsDateToDateTime(jsTime, cal.dtz.floating));
                     box = makeTimeBox(timeString, durPix);
                 } else {
                     box = makeTimeBox("", durPix);
                 }
 
                 // Set up workweek hours
                 if (theHour < this.mDayStartHour || theHour >= this.mDayEndHour) {
                     box.setAttribute("off-time", "true");
@@ -242,17 +242,17 @@
       <xul:calendar-event-box anonid="config-box" hidden="true" xbl:inherits="orient"/>
     </content>
 
     <implementation>
       <constructor><![CDATA[
           Components.utils.import("resource://calendar/modules/calUtils.jsm");
 
           this.mEventInfos = [];
-          this.mTimezone = cal.UTC();
+          this.mTimezone = cal.dtz.UTC;
           this.mSelectedItemIds = {};
       ]]></constructor>
 
       <!-- fields -->
       <field name="mPixPerMin">0.6</field>
       <field name="mStartMin">0</field>
       <field name="mEndMin">24 * 60</field>
       <field name="mDayStartMin">8 * 60</field>
@@ -1198,31 +1198,31 @@
                         prevEnd = col[col.length - 1].endDate.clone();
                     } else {
                         // First event in the column, add a placeholder for the
                         // blank time from this.mStartMin to the event's start
                         prevEnd = start.clone();
                         prevEnd.hour = 0;
                         prevEnd.minute = this.mStartMin;
                     }
-                    prevEnd.timezone = cal.floating();
+                    prevEnd.timezone = cal.dtz.floating;
                     // the reason why we need to calculate time durations
                     // based on floating timezones is that we need avoid
                     // dst gaps in this case. converting the date/times to
                     // floating conveys this idea in a natural way. note that
                     // we explicitly don't use getInTimezone() as it would
                     // be slightly more expensive in terms of performance.
                     let floatstart = start.clone();
-                    floatstart.timezone = cal.floating();
+                    floatstart.timezone = cal.dtz.floating;
                     let dur = floatstart.subtractDate(prevEnd);
                     if (dur.inSeconds) {
                         col.push({ duration: dur });
                     }
                     let floatend = end.clone();
-                    floatend.timezone = cal.floating();
+                    floatend.timezone = cal.dtz.floating;
                     col.push({
                         event: data.itemInfo.event,
                         endDate: end,
                         startDate: start,
                         duration: floatend.subtractDate(floatstart)
                     });
                 }
                 layerOffset = layers.length;
@@ -1956,19 +1956,19 @@
 
             let endhr = Math.floor(realendmin / 60);
             let endmin = realendmin % 60;
 
             let timeFormatter = cal.getDateFormatter();
 
             let jsTime = new Date();
             jsTime.setHours(starthr, startmin);
-            let startstr = timeFormatter.formatTime(cal.jsDateToDateTime(jsTime, cal.floating()));
+            let startstr = timeFormatter.formatTime(cal.dtz.jsDateToDateTime(jsTime, cal.dtz.floating));
             jsTime.setHours(endhr, endmin);
-            let endstr = timeFormatter.formatTime(cal.jsDateToDateTime(jsTime, cal.floating()));
+            let endstr = timeFormatter.formatTime(cal.dtz.jsDateToDateTime(jsTime, cal.dtz.floating));
 
             // Tasks without Entry or Due date have a string as first label
             // instead of the time.
             if (cal.isToDo(this.mDragState.dragOccurrence)) {
                 if (!this.mDragState.dragOccurrence.dueDate) {
                     startstr = cal.calGetString("calendar", "dragLabelTasksWithOnlyEntryDate");
                 } else if (!this.mDragState.dragOccurrence.entryDate) {
                     startstr = cal.calGetString("calendar", "dragLabelTasksWithOnlyDueDate");
@@ -2600,17 +2600,17 @@
         ]]></body>
       </method>
 
       <method name="updateTimeIndicatorPosition">
         <parameter name="aUpdateTheTimer"/>
         <parameter name="aPpmChanged"/>
         <parameter name="aViewChanged"/>
         <body><![CDATA[
-            let now = cal.now();
+            let now = cal.dtz.now();
             let nowMinutes = now.hour * 60 + now.minute;
             if (aUpdateTheTimer) {
                 let prefInt = this.mTimeIndicatorInterval;
                 if (prefInt == 0) {
                     timeIndicator.cancel();
                     return;
                 }
 
@@ -3035,23 +3035,23 @@
             } else { // undated todo
                 return [];
             }
         ]]></body>
       </method>
 
       <method name="centerSelectedItems">
         <body><![CDATA[
-            let displayTZ = cal.calendarDefaultTimezone();
+            let displayTZ = cal.dtz.defaultTimezone;
             let lowMinute = 24 * 60;
             let highMinute = 0;
 
             for (let item of this.mSelectedItems) {
-                let startDateProperty = cal.calGetStartDateProp(item);
-                let endDateProperty = cal.calGetEndDateProp(item);
+                let startDateProperty = cal.dtz.startDateProp(item);
+                let endDateProperty = cal.dtz.endDateProp(item);
 
                 let occs = [];
                 if (item.recurrenceInfo) {
                     // if selected a parent item, show occurrence(s) in view range
                     occs = item.getOccurrencesBetween(this.startDate, this.queryEndDate, {}, 0);
                 } else {
                     occs = [item];
                 }
@@ -3087,17 +3087,17 @@
                     if (occStart.timezone != displayTZ) {
                         occStart = occStart.getInTimezone(displayTZ);
                     }
                     if (occEnd.timezone != displayTZ) {
                         occEnd = occEnd.getInTimezone(displayTZ);
                     }
                     // If crosses midnite in current TZ, set end just
                     // before midnite after start so start/title usually visible.
-                    if (!cal.sameDay(occStart, occEnd)) {
+                    if (!cal.dtz.sameDay(occStart, occEnd)) {
                         occEnd = occStart.clone();
                         occEnd.day = occStart.day;
                         occEnd.hour = 23;
                         occEnd.minute = 59;
                     }
 
                     // Ensure range shows occ
                     lowMinute = Math.min(occStart.hour * 60 + occStart.minute,
@@ -3519,19 +3519,19 @@
         <parameter name="aOccurrences"/>
         <body><![CDATA[
             if (!this.mDateColumns || !this.mDateColumns.length) {
                 return [];
             }
 
             let occMap = {};
             for (let occ of aOccurrences) {
-                let startDate = occ[cal.calGetStartDateProp(occ)]
+                let startDate = occ[cal.dtz.startDateProp(occ)]
                                 .getInTimezone(this.mStartDate.timezone);
-                let endDate = occ[cal.calGetEndDateProp(occ)]
+                let endDate = occ[cal.dtz.endDateProp(occ)]
                                 .getInTimezone(this.mEndDate.timezone) || startDate;
                 if (startDate.compare(this.mStartDate) >= 0 &&
                     endDate.compare(this.mEndDate) <= 0) {
                     for (let i = startDate.day; i <= endDate.day; i++) {
                         occMap[i] = true;
                     }
                 }
             }
@@ -3611,18 +3611,18 @@
             }
             return null;
         ]]></body>
       </method>
 
       <method name="adjustScrollbarSpacersForAlldayEvents">
         <parameter name="aEvent"/>
         <body><![CDATA[
-            let startDate = aEvent[cal.calGetStartDateProp(aEvent)];
-            let endDate = aEvent[cal.calGetEndDateProp(aEvent)];
+            let startDate = aEvent[cal.dtz.startDateProp(aEvent)];
+            let endDate = aEvent[cal.dtz.endDateProp(aEvent)];
             if ((startDate && startDate.isDate) ||
                 (endDate && endDate.isDate)) {
                 // If this is an all day event, then the header with allday
                 // events could possibly get a scrollbar. Readjust them.
                 this.adjustScrollBarSpacers();
             }
         ]]></body>
       </method>
--- a/calendar/base/content/calendar-task-tree.xml
+++ b/calendar/base/content/calendar-task-tree.xml
@@ -285,17 +285,17 @@
             return val;
         ]]></setter>
       </property>
 
       <method name="duration">
         <parameter name="aTask"/>
         <body><![CDATA[
             if (aTask && aTask.dueDate && aTask.dueDate.isValid) {
-                let dur = aTask.dueDate.subtractDate(cal.now());
+                let dur = aTask.dueDate.subtractDate(cal.dtz.now());
                 if (!dur.isNegative) {
                     let minutes = Math.ceil(dur.inSeconds / 60);
                     if (minutes >= 1440) { // 1 day or more
                         let dueIn = PluralForm.get(dur.days, cal.calGetString("calendar", "dueInDays"));
                         return dueIn.replace("#1", dur.days);
                     } else if (minutes >= 60) { // 1 hour or more
                         let dueIn = PluralForm.get(dur.hours, cal.calGetString("calendar", "dueInHours"));
                         return dueIn.replace("#1", dur.hours);
@@ -704,17 +704,17 @@
 
             /**
              * Task Tree Events
              */
             onSelect: function(event) {},
 
             onDoubleClick: function(event) {
                 if (event.button == 0) {
-                    let initialDate = cal.getDefaultStartDate(this.binding.getInitialDate());
+                    let initialDate = cal.dtz.getDefaultStartDate(this.binding.getInitialDate());
                     let col = {};
                     let item = this._getItemFromEvent(event, col);
                     if (item) {
                         let colAnonId = col.value.element.getAttribute("itemproperty");
                         if (colAnonId == "completed") {
                             // item holds checkbox state toggled by first click,
                             // so don't call modifyEventWithDialog
                             // to make sure user notices state changed.
@@ -783,17 +783,17 @@
 
             // Helper function to display datetimes
             _formatDateTime: function(aDateTime) {
                 let dateFormatter = Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
                                               .getService(Components.interfaces.calIDateTimeFormatter);
 
                 // datetime is from todo object, it is not a javascript date
                 if (aDateTime && aDateTime.isValid) {
-                    let dateTime = aDateTime.getInTimezone(cal.calendarDefaultTimezone());
+                    let dateTime = aDateTime.getInTimezone(cal.dtz.defaultTimezone);
                     return dateFormatter.formatDateTime(dateTime);
                 }
                 return "";
             }
         })
       ]]></field>
 
       <!--
@@ -992,17 +992,17 @@
                 let modifier = (this.mTreeView.sortDirection == "descending" ? -1 : 1);
                 let column = this.mTreeView.selectedColumn;
                 cal.sortEntry.mSortKey = column.getAttribute("sortKey")
                                          ? column.getAttribute("sortKey")
                                          : column.getAttribute("itemproperty");
                 let sortType = cal.getSortTypeForSortKey(cal.sortEntry.mSortKey);
 
                 // sort (key,item) entries
-                cal.sortEntry.mSortStartedDate = cal.now();
+                cal.sortEntry.mSortStartedDate = cal.dtz.now();
                 let entries = this.mTaskArray.map(cal.sortEntry, cal.sortEntry);
                 entries.sort(cal.sortEntryComparer(sortType, modifier));
                 this.mTaskArray = entries.map(cal.sortEntryItem);
             }
 
             this.recreateHashTable();
         ]]></body>
       </method>
@@ -1018,17 +1018,17 @@
                 this.mTreeView.treebox.invalidate();
             }
         ]]></body>
       </method>
 
       <method name="getInitialDate">
         <body><![CDATA[
             let initialDate = currentView().selectedDay;
-            return initialDate ? initialDate : cal.now();
+            return initialDate ? initialDate : cal.dtz.now();
         ]]></body>
       </method>
 
       <method name="doUpdateFilter">
         <parameter name="aFilter"/>
         <body><![CDATA[
             let needsRefresh = false;
             let oldStart = this.mFilter.mStartDate;
@@ -1160,24 +1160,24 @@
   <binding id="calendar-task-tree-todaypane" extends="chrome://calendar/content/calendar-task-tree.xml#calendar-task-tree">
     <implementation>
       <constructor><![CDATA[
           Components.utils.import("resource://calendar/modules/calUtils.jsm");
       ]]></constructor>
 
       <method name="getInitialDate">
         <body><![CDATA[
-            let initialDate = agendaListbox.today ? agendaListbox.today.start : cal.now();
-            return initialDate ? initialDate : cal.now();
+            let initialDate = agendaListbox.today ? agendaListbox.today.start : cal.dtz.now();
+            return initialDate ? initialDate : cal.dtz.now();
         ]]></body>
       </method>
 
       <method name="updateFilter">
         <parameter name="aFilter"/>
         <body><![CDATA[
             this.mFilter.selectedDate = agendaListbox.today && agendaListbox.today.start ?
-                                        agendaListbox.today.start : cal.now();
+                                        agendaListbox.today.start : cal.dtz.now();
             this.doUpdateFilter(aFilter);
         ]]></body>
       </method>
     </implementation>
   </binding>
 </bindings>
--- a/calendar/base/content/calendar-task-view.js
+++ b/calendar/base/content/calendar-task-view.js
@@ -80,17 +80,17 @@ var taskDetailsView = {
                         statusDetails.value = cal.calGetString(
                             "calendar",
                             "taskDetailsStatusInProgress", [percent]);
                         break;
                     }
                     case "COMPLETED": {
                         if (item.completedDate) {
                             let completedDate = item.completedDate.getInTimezone(
-                                                    cal.calendarDefaultTimezone());
+                                                    cal.dtz.defaultTimezone);
                             statusDetails.value = cal.calGetString(
                                 "calendar",
                                 "taskDetailsStatusCompletedOn",
                                 [dateFormatter.formatDateTime(completedDate)]);
                         }
                         break;
                     }
                     case "CANCELLED": {
@@ -114,17 +114,17 @@ var taskDetailsView = {
             let parentItem = item;
             if (parentItem.parentItem != parentItem) {
                 // XXXdbo Didn't we want to get rid of these checks?
                 parentItem = parentItem.parentItem;
             }
             let recurrenceInfo = parentItem.recurrenceInfo;
             let recurStart = parentItem.recurrenceStartDate;
             if (displayElement("calendar-task-details-repeat-row", recurrenceInfo && recurStart)) {
-                let kDefaultTimezone = cal.calendarDefaultTimezone();
+                let kDefaultTimezone = cal.dtz.defaultTimezone;
                 let startDate = recurStart.getInTimezone(kDefaultTimezone);
                 let endDate = item.dueDate ? item.dueDate.getInTimezone(kDefaultTimezone) : null;
                 let detailsString = recurrenceRule2String(recurrenceInfo, startDate, endDate, startDate.isDate);
                 if (detailsString) {
                     let rpv = document.getElementById("calendar-task-details-repeat");
                     rpv.value = detailsString.split("\n").join(" ");
                 }
             }
--- a/calendar/base/content/calendar-unifinder.js
+++ b/calendar/base/content/calendar-unifinder.js
@@ -193,17 +193,17 @@ function prepareCalendarUnifinder() {
     branch.addObserver("calendar.", unifinderObserver);
 
     // Check if this is not the hidden window, which has no UI elements
     if (unifinderTree) {
         // set up our calendar event observer
         let ccalendar = cal.getCompositeCalendar(window);
         ccalendar.addObserver(unifinderObserver);
 
-        kDefaultTimezone = cal.calendarDefaultTimezone();
+        kDefaultTimezone = cal.dtz.defaultTimezone;
 
         // Set up the filter
         unifinderTreeView.mFilter = new calFilter();
 
         // Set up the unifinder views.
         unifinderTreeView.treeElement = unifinderTree;
         unifinderTree.view = unifinderTreeView;
 
@@ -548,17 +548,17 @@ var unifinderTreeView = {
      */
     sortItems: function() {
         if (this.selectedColumn) {
             let modifier = (this.sortDirection == "descending" ? -1 : 1);
             let sortKey = unifinderTreeView.selectedColumn.getAttribute("itemproperty");
             let sortType = cal.getSortTypeForSortKey(sortKey);
             // sort (key,item) entries
             cal.sortEntry.mSortKey = sortKey;
-            cal.sortEntry.mSortStartedDate = cal.now();
+            cal.sortEntry.mSortStartedDate = cal.dtz.now();
             let entries = this.eventArray.map(cal.sortEntry, cal.sortEntry);
             entries.sort(cal.sortEntryComparer(sortType, modifier));
             this.eventArray = entries.map(cal.sortEntryItem);
         }
         this.calculateIndexMap();
     },
 
     /**
--- a/calendar/base/content/calendar-views.js
+++ b/calendar/base/content/calendar-views.js
@@ -234,35 +234,35 @@ function switchToView(aViewType) {
     ];
     ids.forEach(x => setupViewNode(x, "tooltiptext"));
 
     try {
         selectedDay = viewDeck.selectedPanel.selectedDay;
         currentSelection = viewDeck.selectedPanel.getSelectedItems({});
     } catch (ex) {
         // This dies if no view has even been chosen this session, but that's
-        // ok because we'll just use cal.now() below.
+        // ok because we'll just use cal.dtz.now() below.
     }
 
     if (!selectedDay) {
-        selectedDay = cal.now();
+        selectedDay = cal.dtz.now();
     }
 
     // Anyone wanting to plug in a view needs to follow this naming scheme
     let view = document.getElementById(aViewType + "-view");
     viewDeck.selectedPanel = view;
 
     // Select the corresponding tab
     let viewTabs = document.getElementById("view-tabs");
     viewTabs.selectedIndex = getViewDeck().selectedIndex;
 
     let compositeCal = cal.getCompositeCalendar(window);
     if (view.displayCalendar != compositeCal) {
         view.displayCalendar = compositeCal;
-        view.timezone = cal.calendarDefaultTimezone();
+        view.timezone = cal.dtz.defaultTimezone;
         view.controller = calendarViewController;
     }
 
     view.goToDay(selectedDay);
     view.setSelectedItems(currentSelection.length, currentSelection);
 
     onCalendarViewResize();
 }
@@ -591,17 +591,17 @@ function toggleShowCompletedInView() {
 }
 
 /**
  * Provides a neutral way to go to the current day in the views and minimonth.
  *
  * @param aDate     The date to go.
  */
 function goToDate(aDate) {
-    getMinimonth().value = cal.dateTimeToJsDate(aDate);
+    getMinimonth().value = cal.dtz.dateTimeToJsDate(aDate);
     currentView().goToDay(aDate);
 }
 
 /**
  * Returns the calendar view that was selected before restart, or the current
  * calendar view if it has already been set in this session
  *
  * @return          The last calendar view.
--- a/calendar/base/content/calendar-views.xml
+++ b/calendar/base/content/calendar-views.xml
@@ -40,17 +40,17 @@
       <method name="moveView">
         <parameter name="aNumber"/>
         <body><![CDATA[
             if (aNumber) {
                 let currentDay = this.startDay.clone();
                 currentDay.day += aNumber;
                 this.goToDay(currentDay);
             } else {
-                this.goToDay(cal.now());
+                this.goToDay(cal.dtz.now());
             }
         ]]></body>
       </method>
     </implementation>
   </binding>
 
   <binding id="calendar-week-view"
            extends="chrome://calendar/content/calendar-multiday-view.xml#calendar-multiday-view">
@@ -107,17 +107,17 @@
       <method name="moveView">
         <parameter name="aNumber"/>
         <body><![CDATA[
             if (aNumber) {
                 let date = this.selectedDay.clone();
                 date.day += 7 * aNumber;
                 this.goToDay(date);
             } else {
-                this.goToDay(cal.now());
+                this.goToDay(cal.dtz.now());
             }
         ]]></body>
       </method>
     </implementation>
   </binding>
 
   <binding id="calendar-multiweek-view" extends="chrome://calendar/content/calendar-month-view.xml#calendar-month-base-view">
     <implementation implements="calICalendarView">
@@ -212,17 +212,17 @@
                 let savedSelectedDay = this.selectedDay.clone();
                 // aNumber only corresponds to the number of weeks to move
                 // make sure to compensate for previous weeks in view too
                 date.day += 7 * (aNumber + Preferences.get("calendar.previousweeks.inview", 4));
                 this.goToDay(date);
                 savedSelectedDay.day += 7 * aNumber;
                 this.selectedDay = savedSelectedDay;
             } else {
-                let date = cal.now();
+                let date = cal.dtz.now();
                 this.goToDay(date);
                 this.selectedDay = date;
             }
         ]]></body>
       </method>
     </implementation>
   </binding>
 
@@ -283,17 +283,17 @@
                 // correct for accidental rollover into the next month
                 if ((newSelectedDay.month - aNumber + 12) % 12 != oldSelectedDay.month) {
                     newSelectedDay.month -= 1;
                     newSelectedDay.day = newSelectedDay.endOfMonth.day;
                 }
 
                 this.selectedDay = newSelectedDay;
             } else {
-                let date = cal.now();
+                let date = cal.dtz.now();
                 this.goToDay(date);
                 this.selectedDay = date;
             }
         ]]></body>
       </method>
     </implementation>
   </binding>
 </bindings>
--- a/calendar/base/content/dialogs/calendar-alarm-dialog.js
+++ b/calendar/base/content/dialogs/calendar-alarm-dialog.js
@@ -214,17 +214,17 @@ function getDuration(aMinutes) {
  * Check whether the snooze period exceeds the current limitation of the AlarmService and prompt
  * the user with a message if so
  * @param   {calIDuration}   aDuration   The duration to snooze
  * @returns {Boolean}
  */
 function aboveSnoozeLimit(aDuration) {
     const LIMIT = Components.interfaces.calIAlarmService.MAX_SNOOZE_MONTHS;
 
-    let currentTime = cal.now().getInTimezone(cal.UTC());
+    let currentTime = cal.dtz.now().getInTimezone(cal.dtz.UTC);
     let limitTime = currentTime.clone();
     limitTime.month += LIMIT;
 
     let durationUntilLimit = limitTime.subtractDate(currentTime);
     if (aDuration.compare(durationUntilLimit) > 0) {
         let msg = PluralForm.get(LIMIT, cal.calGetString("calendar", "alarmSnoozeLimitExceeded"));
         cal.showError(msg.replace("#1", LIMIT), window);
         return true;
@@ -254,18 +254,18 @@ function setupTitle() {
  *                              0 - otherwise
  */
 function widgetAlarmComptor(aItem, aWidgetItem) {
     if (aItem == null || aWidgetItem == null) {
         return -1;
     }
 
     // Get the dates to compare
-    let aDate = aItem[cal.calGetStartDateProp(aItem)];
-    let bDate = aWidgetItem[cal.calGetStartDateProp(aWidgetItem)];
+    let aDate = aItem[cal.dtz.startDateProp(aItem)];
+    let bDate = aWidgetItem[cal.dtz.startDateProp(aWidgetItem)];
 
     return aDate.compare(bDate);
 }
 
 /**
  * Add an alarm widget for the passed alarm and item.
  *
  * @param aItem       The calendar item to add a widget for.
--- a/calendar/base/content/dialogs/calendar-dialog-utils.js
+++ b/calendar/base/content/dialogs/calendar-dialog-utils.js
@@ -136,17 +136,17 @@ function createReminderFromMenuitem(aMen
  */
 function editReminder() {
     let customItem = document.getElementById("reminder-custom-menuitem");
     let args = {};
     args.reminders = customItem.reminders;
     args.item = window.calendarItem;
     args.timezone = window.gStartTimezone ||
                     window.gEndTimezone ||
-                    cal.calendarDefaultTimezone();
+                    cal.dtz.defaultTimezone;
 
     args.calendar = getCurrentCalendar();
 
     // While these are "just" callbacks, the dialog is opened modally, so aside
     // from whats needed to set up the reminders, nothing else needs to be done.
     args.onOk = function(reminders) {
         customItem.reminders = reminders;
     };
--- a/calendar/base/content/dialogs/calendar-event-dialog-attendees.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-attendees.js
@@ -173,17 +173,17 @@ function zoomWithButtons(aZoomOut) {
  * Loads the passed start and end dates, fills global variables that give
  * information about the state of the dialog.
  *
  * @param aStartDate        The date/time the grid should start at.
  * @param aEndDate          The date/time the grid should end at.
  */
 function loadDateTime(aStartDate, aEndDate) {
     gDuration = aEndDate.subtractDate(aStartDate);
-    let kDefaultTimezone = cal.calendarDefaultTimezone();
+    let kDefaultTimezone = cal.dtz.defaultTimezone;
     gStartTimezone = aStartDate.timezone;
     gEndTimezone = aEndDate.timezone;
     gStartDate = aStartDate.getInTimezone(kDefaultTimezone);
     gEndDate = aEndDate.getInTimezone(kDefaultTimezone);
     gStartDate.makeImmutable();
     gEndDate.makeImmutable();
 }
 
@@ -215,17 +215,17 @@ function propagateDateTime() {
                   (grid.endDate.compare(gEndDate) != 0);
     grid.startDate = gStartDate;
     grid.endDate = gEndDate;
     if (refresh) {
         grid.forceRefresh();
     }
 
     // Expand to 24hrs if the new range is outside of the default range.
-    let kDefaultTimezone = cal.calendarDefaultTimezone();
+    let kDefaultTimezone = cal.dtz.defaultTimezone;
     let startTime = gStartDate.getInTimezone(kDefaultTimezone);
     let endTime = gEndDate.getInTimezone(kDefaultTimezone);
     if ((startTime.hour < gStartHour) ||
         (startTime.hour >= gEndHour) ||
         (endTime.hour >= gEndHour) ||
         (startTime.day != endTime.day) ||
         (startTime.isDate)) {
         setForce24Hours(true);
@@ -259,40 +259,40 @@ function updateDateTime() {
                     endTime = endTime.getInTimezone(startTime.timezone);
                 }
             }
         }
 
         // Before feeding the date/time value into the control we need
         // to set the timezone to 'floating' in order to avoid the
         // automatic conversion back into the OS timezone.
-        startTime.timezone = cal.floating();
-        endTime.timezone = cal.floating();
+        startTime.timezone = cal.dtz.floating;
+        endTime.timezone = cal.dtz.floating;
 
-        document.getElementById("event-starttime").value = cal.dateTimeToJsDate(startTime);
-        document.getElementById("event-endtime").value = cal.dateTimeToJsDate(endTime);
+        document.getElementById("event-starttime").value = cal.dtz.dateTimeToJsDate(startTime);
+        document.getElementById("event-endtime").value = cal.dtz.dateTimeToJsDate(endTime);
     } else {
-        let kDefaultTimezone = cal.calendarDefaultTimezone();
+        let kDefaultTimezone = cal.dtz.defaultTimezone;
 
         let startTime = gStartDate.getInTimezone(kDefaultTimezone);
         let endTime = gEndDate.getInTimezone(kDefaultTimezone);
 
         if (startTime.isDate) {
             document.getElementById("all-day")
                 .setAttribute("checked", "true");
         }
 
         // Before feeding the date/time value into the control we need
         // to set the timezone to 'floating' in order to avoid the
         // automatic conversion back into the OS timezone.
-        startTime.timezone = cal.floating();
-        endTime.timezone = cal.floating();
+        startTime.timezone = cal.dtz.floating;
+        endTime.timezone = cal.dtz.floating;
 
-        document.getElementById("event-starttime").value = cal.dateTimeToJsDate(startTime);
-        document.getElementById("event-endtime").value = cal.dateTimeToJsDate(endTime);
+        document.getElementById("event-starttime").value = cal.dtz.dateTimeToJsDate(startTime);
+        document.getElementById("event-endtime").value = cal.dtz.dateTimeToJsDate(endTime);
     }
 
     updateTimezone();
     updateAllDay();
 }
 
 /**
  * This function requires gStartDate and gEndDate and the respective timezone
@@ -347,18 +347,18 @@ function updateStartTime() {
 
     let startWidgetId = "event-starttime";
 
     let startWidget = document.getElementById(startWidgetId);
 
     // jsDate is always in OS timezone, thus we create a calIDateTime
     // object from the jsDate representation and simply set the new
     // timezone instead of converting.
-    let timezone = gDisplayTimezone ? gStartTimezone : cal.calendarDefaultTimezone();
-    let start = cal.jsDateToDateTime(startWidget.value, timezone);
+    let timezone = gDisplayTimezone ? gStartTimezone : cal.dtz.defaultTimezone;
+    let start = cal.dtz.jsDateToDateTime(startWidget.value, timezone);
 
     gStartDate = start.clone();
     start.addDuration(gDuration);
     gEndDate = start.getInTimezone(gEndTimezone);
 
     let allDayElement = document.getElementById("all-day");
     let allDay = allDayElement.getAttribute("checked") == "true";
     if (allDay) {
@@ -380,28 +380,28 @@ function updateEndTime() {
     let startWidgetId = "event-starttime";
     let endWidgetId = "event-endtime";
 
     let startWidget = document.getElementById(startWidgetId);
     let endWidget = document.getElementById(endWidgetId);
 
     let saveStartTime = gStartDate;
     let saveEndTime = gEndDate;
-    let kDefaultTimezone = cal.calendarDefaultTimezone();
+    let kDefaultTimezone = cal.dtz.defaultTimezone;
 
-    gStartDate = cal.jsDateToDateTime(startWidget.value,
-                                  gDisplayTimezone ? gStartTimezone : cal.calendarDefaultTimezone());
+    gStartDate = cal.dtz.jsDateToDateTime(startWidget.value,
+                                  gDisplayTimezone ? gStartTimezone : cal.dtz.defaultTimezone);
 
     let timezone = gEndTimezone;
     if (timezone.isUTC &&
         gStartDate &&
         !cal.compareObjects(gStartTimezone, gEndTimezone)) {
         timezone = gStartTimezone;
     }
-    gEndDate = cal.jsDateToDateTime(endWidget.value,
+    gEndDate = cal.dtz.jsDateToDateTime(endWidget.value,
                                     gDisplayTimezone ? timezone : kDefaultTimezone);
 
     let allDayElement = document.getElementById("all-day");
     let allDay = allDayElement.getAttribute("checked") == "true";
     if (allDay) {
         gStartDate.isDate = true;
         gEndDate.isDate = true;
     }
--- a/calendar/base/content/dialogs/calendar-event-dialog-attendees.xml
+++ b/calendar/base/content/dialogs/calendar-event-dialog-attendees.xml
@@ -1277,49 +1277,49 @@
                   this, "anonid", "selection-bar");
       ]]></constructor>
 
       <property name="baseDate">
         <setter><![CDATA[
             // we need to convert the date/time in question in
             // order to calculate with hours that are aligned
             // with our timebar display.
-            let kDefaultTimezone = cal.calendarDefaultTimezone();
+            let kDefaultTimezone = cal.dtz.defaultTimezone;
             this.mBaseDate = val.getInTimezone(kDefaultTimezone);
             this.mBaseDate.isDate = true;
             this.mBaseDate.makeImmutable();
             return val;
         ]]></setter>
       </property>
 
       <property name="startDate">
         <setter><![CDATA[
             // currently we *always* set the basedate to be
             // equal to the startdate. we'll most probably
             // want to change this later.
             this.baseDate = val;
             // we need to convert the date/time in question in
             // order to calculate with hours that are aligned
             // with our timebar display.
-            let kDefaultTimezone = cal.calendarDefaultTimezone();
+            let kDefaultTimezone = cal.dtz.defaultTimezone;
             this.mStartDate = val.getInTimezone(kDefaultTimezone);
             this.mStartDate.makeImmutable();
             return val;
         ]]></setter>
         <getter><![CDATA[
             return this.mStartDate;
         ]]></getter>
       </property>
 
       <property name="endDate">
         <setter><![CDATA[
             // we need to convert the date/time in question in
             // order to calculate with hours that are aligned
             // with our timebar display.
-            let kDefaultTimezone = cal.calendarDefaultTimezone();
+            let kDefaultTimezone = cal.dtz.defaultTimezone;
             this.mEndDate = val.getInTimezone(kDefaultTimezone);
             if (this.mEndDate.isDate) {
                 this.mEndDate.day += 1;
             }
             this.mEndDate.makeImmutable();
             return val;
         ]]></setter>
         <getter><![CDATA[
--- a/calendar/base/content/dialogs/calendar-event-dialog-freebusy.xml
+++ b/calendar/base/content/dialogs/calendar-event-dialog-freebusy.xml
@@ -432,17 +432,17 @@
           let endTime = args.endTime;
 
           this.initTimeRange();
 
           // The basedate is the date/time from which the display
           // of the timebar starts. The range is the number of days
           // we should be able to show. The start- and enddate
           // is the time the event is scheduled for.
-          let kDefaultTimezone = cal.calendarDefaultTimezone();
+          let kDefaultTimezone = cal.dtz.defaultTimezone;
           this.startDate = startTime.getInTimezone(kDefaultTimezone);
           this.endDate = endTime.getInTimezone(kDefaultTimezone);
           this.mRange = Number(this.getAttribute("range"));
 
           window.addEventListener("load", this.onLoad.bind(this), true);
       ]]></constructor>
 
       <method name="refresh">
@@ -480,17 +480,17 @@
       </method>
 
       <method name="initialize">
         <body><![CDATA[
             let args = window.arguments[0];
             let startTime = args.startTime;
             let endTime = args.endTime;
 
-            let kDefaultTimezone = cal.calendarDefaultTimezone();
+            let kDefaultTimezone = cal.dtz.defaultTimezone;
             this.startDate = startTime.getInTimezone(kDefaultTimezone);
             this.endDate = endTime.getInTimezone(kDefaultTimezone);
 
             // Set the number of 'freebusy-day'-elements
             // we need to fill up the content box.
             // TODO: hardcoded value
             this.mNumDays = 4 * this.mZoomFactor / 100;
             if (this.mNumDays < 2) {
@@ -704,17 +704,17 @@
                 this.mState[i] = Components.interfaces.calIFreeBusyInterval.UNKNOWN;
             }
 
             let step_in_minutes = Math.floor(60 * this.mZoomFactor / 100);
             let formatter = Components.classes[
                 "@mozilla.org/calendar/datetime-formatter;1"]
                     .getService(
                         Components.interfaces.calIDateTimeFormatter);
-            let date = cal.jsDateToDateTime(new Date());
+            let date = cal.dtz.jsDateToDateTime(new Date());
             date.hour = this.mStartHour;
             date.minute = 0;
             let hours =
                 document.getAnonymousElementByAttribute(
                     this, "anonid", "hours");
             if (hours.childNodes.length <= 0) {
                 let template = createXULElement("text");
                 template.className = "freebusy-grid";
@@ -758,17 +758,17 @@
             // which will map the entries to attributes on the xul elements.
             if (aEntries) {
                 // Remember the free/busy array which is used to find a
                 // new time for an event. We store this array only if
                 // the provider returned a valid array. In any other case
                 // (temporarily clean the display) we keep the last know result.
                 this.mEntries = aEntries;
 
-                let kDefaultTimezone = cal.calendarDefaultTimezone();
+                let kDefaultTimezone = cal.dtz.defaultTimezone;
 
                 let start = this.mStartDate.clone();
                 start.hour = 0;
                 start.minute = 0;
                 start.second = 0;
                 start.timezone = kDefaultTimezone;
                 let end = start.clone();
                 end.day += this.mRange;
@@ -911,17 +911,17 @@
         <parameter name="aEndTime"/>
         <parameter name="allDay"/>
         <body><![CDATA[
             let newTime = aStartTime.clone();
             let duration = aEndTime.subtractDate(aStartTime);
             let newEndTime = newTime.clone();
             newEndTime.addDuration(duration);
 
-            let kDefaultTimezone = cal.calendarDefaultTimezone();
+            let kDefaultTimezone = cal.dtz.defaultTimezone;
 
             if (this.mEntries) {
                 for (let entry of this.mEntries) {
                     let rangeStart =
                         entry.interval.start.getInTimezone(kDefaultTimezone);
                     let rangeEnd =
                         entry.interval.end.getInTimezone(kDefaultTimezone);
 
@@ -1141,17 +1141,17 @@
       </method>
 
       <method name="onInitialize">
         <body><![CDATA[
             let args = window.arguments[0];
             let startTime = args.startTime;
             let endTime = args.endTime;
 
-            let kDefaultTimezone = cal.calendarDefaultTimezone();
+            let kDefaultTimezone = cal.dtz.defaultTimezone;
             this.startDate = startTime.getInTimezone(kDefaultTimezone);
             this.endDate = endTime.getInTimezone(kDefaultTimezone);
 
             let listbox =
                 document.getAnonymousElementByAttribute(
                     this, "anonid", "listbox");
             let template =
                 document.getAnonymousElementByAttribute(
--- a/calendar/base/content/dialogs/calendar-event-dialog-recurrence-preview.xml
+++ b/calendar/base/content/dialogs/calendar-event-dialog-recurrence-preview.xml
@@ -48,17 +48,17 @@
 
       <property name="dateTime">
         <setter><![CDATA[
             this.mDateTime = val.clone();
             return this.mDateTime;
         ]]></setter>
         <getter><![CDATA[
             if (this.mDateTime == null) {
-                this.mDateTime = cal.now();
+                this.mDateTime = cal.dtz.now();
             }
             return this.mDateTime;
         ]]></getter>
       </property>
       <method name="onResize">
         <body><![CDATA[
             let minimonth =
                 document.getAnonymousElementByAttribute(
@@ -143,17 +143,17 @@
 
             this.updateContent();
             this.updatePreview(this.mRecurrenceInfo);
         ]]></body>
       </method>
 
       <method name="updateContent">
         <body><![CDATA[
-            let date = cal.dateTimeToJsDate(this.dateTime);
+            let date = cal.dtz.dateTimeToJsDate(this.dateTime);
             let row = document.getAnonymousElementByAttribute(
                           this, "anonid", "row");
             while (row) {
                 let numChilds = row.childNodes.length - 1;
                 for (let i = 0; i < numChilds; i++) {
                     let minimonth = row.childNodes[i];
                     minimonth.showMonth(date);
                     date.setMonth(date.getMonth() + 1);
@@ -181,17 +181,17 @@
             while (row) {
                 // now iterater all the child nodes of this row
                 // in order to visit each minimonth in turn.
                 let numChilds = row.childNodes.length - 1;
                 for (let i = 0; i < numChilds; i++) {
                     // we now have one of the minimonth controls while 'start'
                     // and 'end' are set to the interval this minimonth shows.
                     let minimonth = row.childNodes[i];
-                    minimonth.showMonth(cal.dateTimeToJsDate(start));
+                    minimonth.showMonth(cal.dtz.dateTimeToJsDate(start));
                     if (aRecurrenceInfo) {
                         // retrieve an array of dates that represents all occurrences
                         // that fall into this time interval [start,end[.
                         // note: the following loop assumes that this array conains
                         // dates that are strictly monotonically increasing.
                         // should getOccurrenceDates() not enforce this assumption we
                         // need to fall back to some different algorithm.
                         let dates = aRecurrenceInfo.getOccurrenceDates(start, end, 0, {});
--- a/calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-recurrence.js
@@ -23,22 +23,22 @@ function onLoad() {
     let args = window.arguments[0];
     let item = args.calendarEvent;
     let calendar = item.calendar;
     let recinfo = args.recurrenceInfo;
 
     gStartTime = args.startTime;
     gEndTime = args.endTime;
     let preview = document.getElementById("recurrence-preview");
-    preview.dateTime = gStartTime.getInTimezone(cal.calendarDefaultTimezone());
+    preview.dateTime = gStartTime.getInTimezone(cal.dtz.defaultTimezone);
 
     onChangeCalendar(calendar);
 
     // Set starting value for 'repeat until' rule and highlight the start date.
-    let repeatDate = cal.dateTimeToJsDate(gStartTime.getInTimezone(cal.floating()));
+    let repeatDate = cal.dtz.dateTimeToJsDate(gStartTime.getInTimezone(cal.dtz.floating));
     setElementValue("repeat-until-date", repeatDate);
     document.getElementById("repeat-until-date").extraDate = repeatDate;
 
     if (item.parentItem != item) {
         item = item.parentItem;
     }
     let rule = null;
     if (recinfo) {
@@ -127,17 +127,17 @@ function initializeControls(rule) {
             document.getElementById("period-list").selectedIndex = 0;
             dump("unable to handle your rule type!\n");
             break;
     }
 
     let byDayRuleComponent = rule.getComponent("BYDAY", {});
     let byMonthDayRuleComponent = rule.getComponent("BYMONTHDAY", {});
     let byMonthRuleComponent = rule.getComponent("BYMONTH", {});
-    let kDefaultTimezone = cal.calendarDefaultTimezone();
+    let kDefaultTimezone = cal.dtz.defaultTimezone;
     let startDate = gStartTime.getInTimezone(kDefaultTimezone);
 
     // "DAILY" ruletype
     // byDayRuleComponents may have been set priorily by "MONTHLY"- ruletypes
     // where they have a different context-
     // that's why we also query the current rule-type
     if (byDayRuleComponent.length == 0 || rule.type != "DAILY") {
         document.getElementById("daily-group").selectedIndex = 0;
@@ -230,17 +230,17 @@ function initializeControls(rule) {
         let untilDate = rule.untilDate;
         if (untilDate) {
             gUntilDate = untilDate.getInTimezone(gStartTime.timezone); // calIRecurrenceRule::untilDate is always UTC or floating
             // Change the until date to start date if the rule has a forbidden
             // value (earlier than the start date).
             if (gUntilDate.compare(gStartTime) < 0) {
                 gUntilDate = gStartTime.clone();
             }
-            let repeatDate = cal.dateTimeToJsDate(gUntilDate.getInTimezone(cal.floating()));
+            let repeatDate = cal.dtz.dateTimeToJsDate(gUntilDate.getInTimezone(cal.dtz.floating));
             setElementValue("recurrence-duration", "until");
             setElementValue("repeat-until-date", repeatDate);
         } else {
             setElementValue("recurrence-duration", "forever");
         }
     }
 }
 
@@ -373,17 +373,17 @@ function onSave(item) {
             recRule.count = -1;
             break;
         }
         case "ntimes": {
             recRule.count = Math.max(1, getElementValue("repeat-ntimes-count"));
             break;
         }
         case "until": {
-            let untilDate = cal.jsDateToDateTime(getElementValue("repeat-until-date"), gStartTime.timezone);
+            let untilDate = cal.dtz.jsDateToDateTime(getElementValue("repeat-until-date"), gStartTime.timezone);
             untilDate.isDate = gStartTime.isDate; // enforce same value type as DTSTART
             if (!gStartTime.isDate) {
                 // correct UNTIL to exactly match start date's hour, minute, second:
                 untilDate.hour = gStartTime.hour;
                 untilDate.minute = gStartTime.minute;
                 untilDate.second = gStartTime.second;
             }
             recRule.untilDate = untilDate;
@@ -590,17 +590,17 @@ function updatePreview() {
         item = item.parentItem;
     }
 
     // TODO: We should better start the whole dialog with a newly cloned item
     // and always pump changes immediately into it. This would eliminate the
     // need to break the encapsulation, as we do it here. But we need the item
     // to contain the startdate in order to calculate the recurrence preview.
     item = item.clone();
-    let kDefaultTimezone = cal.calendarDefaultTimezone();
+    let kDefaultTimezone = cal.dtz.defaultTimezone;
     if (cal.isEvent(item)) {
         let startDate = gStartTime.getInTimezone(kDefaultTimezone);
         let endDate = gEndTime.getInTimezone(kDefaultTimezone);
         if (startDate.isDate) {
             endDate.day--;
         }
 
         item.startDate = startDate;
@@ -628,21 +628,21 @@ function updatePreview() {
 
 /**
  * Checks the until date just entered in the datepicker in order to avoid
  * setting a date earlier than the start date.
  * Restores the previous correct date, shows a warning and prevents to close the
  * dialog when the user enters a wrong until date.
  */
 function checkUntilDate() {
-    let untilDate = cal.jsDateToDateTime(getElementValue("repeat-until-date"), gStartTime.timezone);
+    let untilDate = cal.dtz.jsDateToDateTime(getElementValue("repeat-until-date"), gStartTime.timezone);
     let startDate = gStartTime.clone();
     startDate.isDate = true;
     if (untilDate.compare(startDate) < 0) {
-        let repeatDate = cal.dateTimeToJsDate((gUntilDate || gStartTime).getInTimezone(cal.floating()));
+        let repeatDate = cal.dtz.dateTimeToJsDate((gUntilDate || gStartTime).getInTimezone(cal.dtz.floating));
         setElementValue("repeat-until-date", repeatDate);
         checkUntilDate.warning = true;
         let callback = function() {
             // No warning when the dialog is being closed with the Cancel button.
             if (!checkUntilDate.warning) {
                 return;
             }
             Services.prompt.alert(null, document.title,
--- a/calendar/base/content/dialogs/calendar-event-dialog-reminder.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-reminder.js
@@ -90,17 +90,17 @@ function loadReminders() {
             // action is actually supported by the calendar.
             listbox.appendChild(setupListItem(null, reminders[i].clone(), args.item));
         }
     }
 
     // Set up a default absolute date. This will be overridden if the selected
     // alarm is absolute.
     let absDate = document.getElementById("reminder-absolute-date");
-    absDate.value = cal.dateTimeToJsDate(cal.getDefaultStartDate());
+    absDate.value = cal.dtz.dateTimeToJsDate(cal.dtz.getDefaultStartDate());
 
     if (listbox.childNodes.length) {
         // We have reminders, select the first by default. For some reason,
         // setting the selected index in a load handler makes the selection
         // break for the set item, therefore we need a setTimeout.
         setupMaxReminders();
         setTimeout(() => { listbox.selectedIndex = 0; }, 0);
     } else {
@@ -244,17 +244,17 @@ function onReminderSelected() {
         // Action
         actionType.value = reminder.action;
 
         // Absolute/relative things
         if (reminder.related == Components.interfaces.calIAlarm.ALARM_RELATED_ABSOLUTE) {
             relationType.value = "absolute";
 
             // Date
-            absDate.value = cal.dateTimeToJsDate(reminder.alarmDate || cal.getDefaultStartDate());
+            absDate.value = cal.dtz.dateTimeToJsDate(reminder.alarmDate || cal.dtz.getDefaultStartDate());
         } else {
             relationType.value = "relative";
 
             // Unit and length
             let alarmlen = Math.abs(reminder.offset.inSeconds / 60);
             if (alarmlen % 1440 == 0) {
                 unit.value = "days";
                 length.value = alarmlen / 1440;
@@ -330,17 +330,17 @@ function updateReminder(event) {
         offset[unit.value] = length.value;
         offset.normalize();
         offset.isNegative = (relation == "before");
         reminder.offset = offset;
     } else if (relationItem.value == "absolute") {
         reminder.related = Components.interfaces.calIAlarm.ALARM_RELATED_ABSOLUTE;
 
         if (absDate.value) {
-            reminder.alarmDate = cal.jsDateToDateTime(absDate.value,
+            reminder.alarmDate = cal.dtz.jsDateToDateTime(absDate.value,
                                                       window.arguments[0].timezone);
         } else {
             reminder.alarmDate = null;
         }
     }
 
     setupListItem(listitem, reminder, window.arguments[0].item);
 }
--- a/calendar/base/content/dialogs/calendar-event-dialog-timezone.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog-timezone.js
@@ -19,20 +19,20 @@ function onLoad() {
                      cal.getTimezoneService();
     window.tzProvider = tzProvider;
 
     let menulist = document.getElementById("timezone-menulist");
     let tzMenuPopup = document.getElementById("timezone-menupopup");
 
     // floating and UTC (if supported) at the top:
     if (args.calendar.getProperty("capabilities.timezones.floating.supported") !== false) {
-        addMenuItem(tzMenuPopup, cal.floating().displayName, cal.floating().tzid);
+        addMenuItem(tzMenuPopup, cal.dtz.floating.displayName, cal.dtz.floating.tzid);
     }
     if (args.calendar.getProperty("capabilities.timezones.UTC.supported") !== false) {
-        addMenuItem(tzMenuPopup, cal.UTC().displayName, cal.UTC().tzid);
+        addMenuItem(tzMenuPopup, cal.dtz.UTC.displayName, cal.dtz.UTC.tzid);
     }
 
     let enumerator = tzProvider.timezoneIds;
     let tzids = {};
     let displayNames = [];
     while (enumerator.hasMore()) {
         let timezone = tzProvider.getTimezone(enumerator.getNext());
         if (timezone && !timezone.isFloating && !timezone.isUTC) {
@@ -45,17 +45,17 @@ function onLoad() {
     displayNames.sort((a, b) => a.localeCompare(b));
     for (let i = 0; i < displayNames.length; ++i) {
         let displayName = displayNames[i];
         addMenuItem(tzMenuPopup, displayName, tzids[displayName]);
     }
 
     let index = findTimezone(window.time.timezone);
     if (index < 0) {
-        index = findTimezone(cal.calendarDefaultTimezone());
+        index = findTimezone(cal.dtz.defaultTimezone);
         if (index < 0) {
             index = 0;
         }
     }
 
     menulist = document.getElementById("timezone-menulist");
     menulist.selectedIndex = index;
 
@@ -94,18 +94,18 @@ function updateTimezone() {
 
     // convert the date/time to the currently selected timezone
     // and display the result in the appropriate control.
     // before feeding the date/time value into the control we need
     // to set the timezone to 'floating' in order to avoid the
     // automatic conversion back into the OS timezone.
     let datetime = document.getElementById("timezone-time");
     let time = window.time.getInTimezone(timezone);
-    time.timezone = cal.floating();
-    datetime.value = cal.dateTimeToJsDate(time);
+    time.timezone = cal.dtz.floating;
+    datetime.value = cal.dtz.dateTimeToJsDate(time);
 
     // don't highlight any timezone in the map by default
     let standardTZOffset = "none";
     if (timezone.isUTC) {
         standardTZOffset = "+0000";
     } else if (!timezone.isFloating) {
         let standard = timezone.icalComponent.getFirstSubcomponent("STANDARD");
         // any reason why valueAsIcalString is used instead of plain value? xxx todo: ask mickey
--- a/calendar/base/content/dialogs/calendar-print-dialog.js
+++ b/calendar/base/content/dialogs/calendar-print-dialog.js
@@ -20,18 +20,18 @@ function getCalendarView() {
 
 /**
  * Loads the print dialog, setting up all needed elements.
  */
 function loadCalendarPrintDialog() {
     // set the datepickers to the currently selected dates
     let theView = getCalendarView();
     if (theView) {
-        document.getElementById("start-date-picker").value = cal.dateTimeToJsDate(theView.startDay);
-        document.getElementById("end-date-picker").value = cal.dateTimeToJsDate(theView.endDay);
+        document.getElementById("start-date-picker").value = cal.dtz.dateTimeToJsDate(theView.startDay);
+        document.getElementById("end-date-picker").value = cal.dtz.dateTimeToJsDate(theView.endDay);
     } else {
         document.getElementById("printCurrentViewRadio").setAttribute("disabled", true);
     }
     if (!theView || !theView.getSelectedItems({}).length) {
         document.getElementById("selected").setAttribute("disabled", true);
     }
     document.getElementById(theView ? "printCurrentViewRadio" : "custom-range")
             .setAttribute("selected", true);
@@ -118,20 +118,20 @@ function getPrintSettings(receiverFunc) 
             // We've set the event list above, no need to fetch items below.
             requiresFetch = false;
             break;
         }
         case "custom": {
             // We return the time from the timepickers using the selected
             // timezone, as not doing so in timezones with a positive offset
             // from UTC may cause the printout to include the wrong days.
-            let currentTimezone = cal.calendarDefaultTimezone();
-            settings.start = cal.jsDateToDateTime(document.getElementById("start-date-picker").value);
+            let currentTimezone = cal.dtz.defaultTimezone;
+            settings.start = cal.dtz.jsDateToDateTime(document.getElementById("start-date-picker").value);
             settings.start = settings.start.getInTimezone(currentTimezone);
-            settings.end = cal.jsDateToDateTime(document.getElementById("end-date-picker").value);
+            settings.end = cal.dtz.jsDateToDateTime(document.getElementById("end-date-picker").value);
             settings.end = settings.end.getInTimezone(currentTimezone);
             settings.end = settings.end.clone();
             settings.end.day += 1;
             break;
         }
         default: {
             dump("Error : no case in printDialog.js::printCalendar()");
             break;
--- a/calendar/base/content/dialogs/calendar-summary-dialog.js
+++ b/calendar/base/content/dialogs/calendar-summary-dialog.js
@@ -302,17 +302,17 @@ function updateRepeatDetails() {
     // First of all collapse the details text. If we fail to
     // create a details string, we simply don't show anything.
     // this could happen if the repeat rule is something exotic
     // we don't have any strings prepared for.
     let repeatDetails = document.getElementById("repeat-details");
     repeatDetails.setAttribute("collapsed", "true");
 
     // Try to create a descriptive string from the rule(s).
-    let kDefaultTimezone = cal.calendarDefaultTimezone();
+    let kDefaultTimezone = cal.dtz.defaultTimezone;
     let startDate = item.startDate || item.entryDate;
     let endDate = item.endDate || item.dueDate;
     startDate = startDate ? startDate.getInTimezone(kDefaultTimezone) : null;
     endDate = endDate ? endDate.getInTimezone(kDefaultTimezone) : null;
     let detailsString = recurrenceRule2String(recurrenceInfo, startDate,
                                               endDate, startDate.isDate);
 
     if (!detailsString) {
--- a/calendar/base/content/preferences/general.js
+++ b/calendar/base/content/preferences/general.js
@@ -13,18 +13,18 @@ var gCalendarGeneralPane = {
     /**
      * Initialize the general pref pane. Sets up dialog controls to match the
      * values set in prefs.
      */
     init: function() {
         let formatter = Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
                                   .getService(Components.interfaces.calIDateTimeFormatter);
 
-        let dateFormattedLong = formatter.formatDateLong(cal.now());
-        let dateFormattedShort = formatter.formatDateShort(cal.now());
+        let dateFormattedLong = formatter.formatDateLong(cal.dtz.now());
+        let dateFormattedShort = formatter.formatDateShort(cal.dtz.now());
 
         // menu items include examples of current date formats.
         document.getElementById("dateformat-long-menuitem")
                 .setAttribute("label", labelLong + ": " + dateFormattedLong);
         document.getElementById("dateformat-short-menuitem")
                 .setAttribute("label", labelShort + ": " + dateFormattedShort);
 
         // deselect and reselect to update visible item title
@@ -51,17 +51,17 @@ var gCalendarGeneralPane = {
         // the display names need to be sorted
         displayNames.sort((a, b) => a.localeCompare(b));
         for (let displayName of displayNames) {
             addMenuItem(tzMenuPopup, displayName, tzids[displayName]);
         }
 
         let prefValue = document.getElementById("calendar-timezone-local").value;
         if (!prefValue) {
-            prefValue = cal.calendarDefaultTimezone().tzid;
+            prefValue = cal.dtz.defaultTimezone.tzid;
         }
         tzMenuList.value = prefValue;
 
         // Set the soondays menulist preference
         this.initializeTodaypaneMenu();
     },
 
     updateDefaultTodoDates: function() {
--- a/calendar/base/content/today-pane.js
+++ b/calendar/base/content/today-pane.js
@@ -109,17 +109,17 @@ var TodayPane = {
         let childNodes = monthdisplaydeck.childNodes;
 
         for (let i = 0; i < childNodes.length; i++) {
             let monthlabel = childNodes[i];
             this.setMonthDescription(monthlabel, i, kYEARINIT, kCALWEEKINIT);
         }
 
         agendaListbox.addListener(this);
-        this.setDay(cal.now());
+        this.setDay(cal.dtz.now());
     },
 
     /**
      * Go to month/week/day views when double-clicking a label inside miniday
      */
     onDoubleClick: function(aEvent) {
         if (aEvent.button == 0) {
             if (aEvent.target.id == "datevalue-label") {
@@ -327,18 +327,18 @@ var TodayPane = {
     },
 
     /**
      * Sets the shown date from a JSDate.
      *
      * @param aNewDate      The date to show.
      */
     setDaywithjsDate: function(aNewDate) {
-        let newdatetime = cal.jsDateToDateTime(aNewDate, cal.floating());
-        newdatetime = newdatetime.getInTimezone(cal.calendarDefaultTimezone());
+        let newdatetime = cal.dtz.jsDateToDateTime(aNewDate, cal.dtz.floating);
+        newdatetime = newdatetime.getInTimezone(cal.dtz.defaultTimezone);
         this.setDay(newdatetime, true);
     },
 
     /**
      * Sets the first day shown in the today pane.
      *
      * @param aNewDate                  The calIDateTime to set.
      * @param aDontUpdateMinimonth      If true, the minimonth will not be
@@ -357,17 +357,17 @@ var TodayPane = {
         monthnamedeck.selectedIndex = this.start.month;
 
         let selMonthPanel = monthnamedeck.selectedPanel;
         this.setMonthDescription(selMonthPanel,
                                  this.start.month,
                                  this.start.year,
                                  cal.getWeekInfoService().getWeekTitle(this.start));
         if (!aDontUpdateMinimonth) {
-            document.getElementById("today-Minimonth").value = cal.dateTimeToJsDate(this.start);
+            document.getElementById("today-Minimonth").value = cal.dtz.dateTimeToJsDate(this.start);
         }
         this.updatePeriod();
     },
 
     /**
      * Advance by a given number of days in the today pane.
      *
      * @param aDir      The number of days to advance. Negative numbers advance
@@ -379,17 +379,17 @@ var TodayPane = {
             this.setDay(this.start);
         }
     },
 
     /**
      * Checks if the today pane is showing today's date.
      */
     showsToday: function() {
-        return cal.sameDay(cal.now(), this.start);
+        return cal.dtz.sameDay(cal.dtz.now(), this.start);
     },
 
     /**
      * Update the period headers in the agenda listbox using the today pane's
      * start date.
      */
     updatePeriod: function() {
         agendaListbox.refreshPeriodDates(this.start.clone());
--- a/calendar/base/content/today-pane.xul
+++ b/calendar/base/content/today-pane.xul
@@ -109,17 +109,17 @@
                           <toolbarbutton id="previous-day-button"
                                          class="miniday-nav-buttons"
                                          tooltiptext="&onedaybackward.tooltip;"
                                          onmousedown="TodayPane.onMousedown(event, parseInt(this.getAttribute('dir')));"
                                          dir="-1"/>
                           <toolbarbutton id="today-button"
                                          class="miniday-nav-buttons"
                                          tooltiptext="&showToday.tooltip;"
-                                         oncommand="TodayPane.setDay(cal.now());"/>
+                                         oncommand="TodayPane.setDay(cal.dtz.now());"/>
                           <toolbarbutton id="next-day-button"
                                          class="miniday-nav-buttons"
                                          tooltiptext="&onedayforward.tooltip;"
                                          onmousedown="TodayPane.onMousedown(event, parseInt(this.getAttribute('dir')));"
                                          dir="1"/>
                         </hbox>
                       </hbox>
                       <hbox pack="start">
--- a/calendar/base/content/widgets/calendar-alarm-widget.xml
+++ b/calendar/base/content/widgets/calendar-alarm-widget.xml
@@ -86,17 +86,17 @@
 
             // Dates
             if (cal.isEvent(this.mItem)) {
                 dateLabel.textContent = formatter.formatItemInterval(this.mItem);
             } else if (cal.isToDo(this.mItem)) {
                 let startDate = this.mItem.entryDate || this.mItem.dueDate;
                 if (startDate) {
                     // A Task with a start or due date, show with label
-                    startDate = startDate.getInTimezone(cal.calendarDefaultTimezone());
+                    startDate = startDate.getInTimezone(cal.dtz.defaultTimezone);
                     dateLabel.textContent = cal.calGetString("calendar",
                                                              "alarmStarts",
                                                              [formatter.formatDateTime(startDate)]);
                 } else {
                     // If the task has no start date, then format the alarm date.
                     dateLabel.textContent = formatter.formatDateTime(this.mAlarm.alarmDate);
                 }
             } else {
@@ -134,20 +134,20 @@
       </method>
 
       <method name="updateRelativeDateLabel">
         <body><![CDATA[
             let formatter = cal.getDateFormatter();
             let item = this.mItem;
             let relativeDateLabel = document.getAnonymousElementByAttribute(this, "anonid", "alarm-relative-date-label");
             let relativeDateString;
-            let startDate = item[cal.calGetStartDateProp(item)] || item[cal.calGetEndDateProp(item)];
+            let startDate = item[cal.dtz.startDateProp(item)] || item[cal.dtz.endDateProp(item)];
             if (startDate) {
-                startDate = startDate.getInTimezone(cal.calendarDefaultTimezone());
-                let currentDate = cal.now();
+                startDate = startDate.getInTimezone(cal.dtz.defaultTimezone);
+                let currentDate = cal.dtz.now();
                 let sinceDayStart = (currentDate.hour * 3600) + (currentDate.minute * 60);
 
                 currentDate.second = 0;
                 startDate.second = 0;
 
                 let sinceAlarm = currentDate.subtractDate(startDate).inSeconds;
                 this.mAlarmToday = (sinceAlarm < sinceDayStart) && (sinceAlarm > sinceDayStart - 86400);
 
--- a/calendar/base/content/widgets/calendar-widgets.xml
+++ b/calendar/base/content/widgets/calendar-widgets.xml
@@ -239,17 +239,17 @@
     <implementation>
       <constructor><![CDATA[
           Components.utils.import("resource://calendar/modules/calUtils.jsm");
           this.setUpTodayDate();
       ]]></constructor>
 
       <method name="setUpTodayDate">
         <body><![CDATA[
-            let dayNumber = cal.calGetString("dateFormat", "day." + cal.now().day + ".number");
+            let dayNumber = cal.calGetString("dateFormat", "day." + cal.dtz.now().day + ".number");
             document.getAnonymousElementByAttribute(this, "anonid", "day-label").value = dayNumber;
         ]]></body>
       </method>
     </implementation>
    </binding>
 
   <!-- this binding directly extends to a checkbox but is visualized as
        a treenode in a treecontrol-->
--- a/calendar/base/content/widgets/minimonth.xml
+++ b/calendar/base/content/widgets/minimonth.xml
@@ -410,25 +410,25 @@
       <property name="extra"
                 onget="return this.mExtraDate"
                 onset="this.mExtraDate = val"/>
 
        <!--returns the first (inclusive) date of the minimonth as a calIDateTime object-->
       <property name="firstDate" readonly="true">
         <getter><![CDATA[
             let date = this._getCalBoxNode(1, 1).date;
-            return cal.jsDateToDateTime(date);
+            return cal.dtz.jsDateToDateTime(date);
         ]]></getter>
       </property>
 
        <!--returns the last (exclusive) date of the minimonth as a calIDateTime object-->
       <property name="lastDate" readonly="true">
         <getter><![CDATA[
             let date = this._getCalBoxNode(6, 7).date;
-            let lastDateTime = cal.jsDateToDateTime(date);
+            let lastDateTime = cal.dtz.jsDateToDateTime(date);
             lastDateTime.day = lastDateTime.day + 1;
             return lastDateTime;
         ]]></getter>
       </property>
 
       <field name="mDaymap">null</field>
       <field name="mValue">null</field>
       <field name="mEditorDate">null</field>
@@ -573,25 +573,25 @@
       <method name="setBusyDaysForOccurrence">
         <parameter name="aOccurrence"/>
         <parameter name="aState"/>
         <body><![CDATA[
             if (aOccurrence.getProperty("TRANSP") == "TRANSPARENT") {
                 // Skip transparent events
                 return;
             }
-            let start = aOccurrence[cal.calGetStartDateProp(aOccurrence)] || aOccurrence.dueDate;
-            let end = aOccurrence[cal.calGetEndDateProp(aOccurrence)] || start;
+            let start = aOccurrence[cal.dtz.startDateProp(aOccurrence)] || aOccurrence.dueDate;
+            let end = aOccurrence[cal.dtz.endDateProp(aOccurrence)] || start;
             if (!start) {
                 return;
             }
 
             // We need to compare with midnight of the current day, so reset the
             // time here.
-            let current = start.clone().getInTimezone(cal.calendarDefaultTimezone());
+            let current = start.clone().getInTimezone(cal.dtz.defaultTimezone);
             current.hour = 0;
             current.minute = 0;
             current.second = 0;
 
             // Cache the result so the compare isn't called in each iteration.
             let compareResult = (start.compare(end) == 0 ? 1 : 0);
 
             // Setup the busy days.
@@ -874,26 +874,26 @@
                 let monthName = cal.formatMonth(aDate.getMonth() + 1,
                                                 "calendar", "monthInYear");
                 let label = cal.calGetString("calendar", "monthInYear",
                                          [monthName, aDate.getFullYear()]);
                 calbox.setAttribute("aria-label", label);
             }
 
             this.mDayMap = {};
-            let defaultTz = cal.calendarDefaultTimezone();
+            let defaultTz = cal.dtz.defaultTimezone;
             let dateFormatter =
                 new Services.intl.DateTimeFormat(undefined, { dateStyle: "long" });
             for (let k = 1; k < 7; k++) {
                 // Set the week number.
                 let firstElement = this._getCalBoxNode(k, 0);
                 setBooleanAttribute(firstElement, "hidden", !this.mShowWeekNumber);
                 if (this.mShowWeekNumber) {
                     let weekNumber = cal.getWeekInfoService()
-                                        .getWeekTitle(cal.jsDateToDateTime(date, defaultTz));
+                                        .getWeekTitle(cal.dtz.jsDateToDateTime(date, defaultTz));
                     let weekTitle = cal.calGetString("calendar", "WeekTitle", [weekNumber]);
                     firstElement.textContent = weekNumber;
                     firstElement.setAttribute("aria-label", weekTitle);
                 }
 
                 for (let i = 1; i < 8; i++) {
                     let day = this._getCalBoxNode(k, i);
                     let ymd = date.getFullYear() + "-" +
@@ -1001,17 +1001,17 @@
                         default:
                             aBox.removeAttribute(aBox.attributes[allowedAttributes].nodeName);
                             break;
                     }
                 }
             }
 
             if (aDate) {
-                let box = this.getBoxForDate(cal.jsDateToDateTime(aDate, cal.calendarDefaultTimezone()));
+                let box = this.getBoxForDate(cal.dtz.jsDateToDateTime(aDate, cal.dtz.defaultTimezone));
                 if (box) {
                     removeForBox(box);
                 }
             } else {
                 for (let k = 1; k < 7; k++) {
                     for (let i = 1; i < 8; i++) {
                         removeForBox(this._getCalBoxNode(k, i));
                     }
@@ -1109,17 +1109,17 @@
             this.updateAccessibleLabel();
         ]]></body>
       </method>
 
       <method name="setFocusedDate">
         <parameter name="aDate"/>
         <parameter name="aForceFocus"/>
         <body><![CDATA[
-            let newFocused = this.getBoxForDate(cal.jsDateToDateTime(aDate, cal.calendarDefaultTimezone()));
+            let newFocused = this.getBoxForDate(cal.dtz.jsDateToDateTime(aDate, cal.dtz.defaultTimezone));
             if (!newFocused) {
                 return;
             }
             if (this.mFocused) {
                 this.mFocused.setAttribute("tabindex", "-1");
             }
             this.mFocused = newFocused;
             this.mFocused.setAttribute("tabindex", "0");
@@ -1185,17 +1185,17 @@
                 // change month and select day
                 this.mValue = aDate;
                 this.showMonth(aMainDate);
             } else if (!sameMonth) {
                 // change month only
                 this.showMonth(aMainDate);
             } else if (!sameDate) {
                 // select day only
-                let day = this.getBoxForDate(cal.jsDateToDateTime(aDate, cal.calendarDefaultTimezone()));
+                let day = this.getBoxForDate(cal.dtz.jsDateToDateTime(aDate, cal.dtz.defaultTimezone));
                 if (this.mSelected) {
                     this.mSelected.removeAttribute("selected");
                 }
                 this.mSelected = day;
                 day.setAttribute("selected", "true");
                 this.mValue = aDate;
                 this.setFocusedDate(aDate);
             }
--- a/calendar/base/modules/calAlarmUtils.jsm
+++ b/calendar/base/modules/calAlarmUtils.jsm
@@ -26,17 +26,17 @@ cal.alarms = {
                 units = "minutes";
             }
 
             alarmOffset[units] = Preferences.get("calendar.alarms." + type + "alarmlen", 0);
             alarmOffset.normalize();
             alarmOffset.isNegative = true;
             if (type == "todo" && !aItem.entryDate) {
                 // You can't have an alarm if the entryDate doesn't exist.
-                aItem.entryDate = cal.now();
+                aItem.entryDate = cal.dtz.now();
             }
             alarm.related = Components.interfaces.calIAlarm.ALARM_RELATED_START;
             alarm.offset = alarmOffset;
 
             // Default to a display alarm, unless the calendar doesn't support
             // it or we have no calendar yet. (Man this is hard to wrap)
             let actionValues = (aItem.calendar &&
                                  aItem.calendar.getProperty("capabilities.alarms.actionValues")) ||
@@ -55,32 +55,32 @@ cal.alarms = {
      * @return          The alarm date.
      */
     calculateAlarmDate: function(aItem, aAlarm) {
         if (aAlarm.related == aAlarm.ALARM_RELATED_ABSOLUTE) {
             return aAlarm.alarmDate;
         } else {
             let returnDate;
             if (aAlarm.related == aAlarm.ALARM_RELATED_START) {
-                returnDate = aItem[cal.calGetStartDateProp(aItem)];
+                returnDate = aItem[cal.dtz.startDateProp(aItem)];
             } else if (aAlarm.related == aAlarm.ALARM_RELATED_END) {
-                returnDate = aItem[cal.calGetEndDateProp(aItem)];
+                returnDate = aItem[cal.dtz.endDateProp(aItem)];
             }
 
             if (returnDate && aAlarm.offset) {
                 // Handle all day events.  This is kinda weird, because they don't
                 // have a well defined startTime.  We just consider the start/end
                 // to be midnight in the user's timezone.
                 if (returnDate.isDate) {
-                    let timezone = cal.calendarDefaultTimezone();
+                    let timezone = cal.dtz.defaultTimezone;
                     // This returns a copy, so no extra cloning needed.
                     returnDate = returnDate.getInTimezone(timezone);
                     returnDate.isDate = false;
                 } else if (returnDate.timezone.tzid == "floating") {
-                    let timezone = cal.calendarDefaultTimezone();
+                    let timezone = cal.dtz.defaultTimezone;
                     returnDate = returnDate.getInTimezone(timezone);
                 } else {
                     // Clone the date to correctly add the duration.
                     returnDate = returnDate.clone();
                 }
 
                 returnDate.addDuration(aAlarm.offset);
                 return returnDate;
@@ -100,19 +100,19 @@ cal.alarms = {
      *                    passed, ALARM_RELATED_START will be assumed.
      * @return          The alarm offset.
      */
     calculateAlarmOffset: function(aItem, aAlarm, aRelated) {
         let offset = aAlarm.offset;
         if (aAlarm.related == aAlarm.ALARM_RELATED_ABSOLUTE) {
             let returnDate;
             if (aRelated === undefined || aRelated == aAlarm.ALARM_RELATED_START) {
-                returnDate = aItem[cal.calGetStartDateProp(aItem)];
+                returnDate = aItem[cal.dtz.startDateProp(aItem)];
             } else if (aRelated == aAlarm.ALARM_RELATED_END) {
-                returnDate = aItem[cal.calGetEndDateProp(aItem)];
+                returnDate = aItem[cal.dtz.endDateProp(aItem)];
             }
 
             if (returnDate && aAlarm.alarmDate) {
                 offset = aAlarm.alarmDate.subtractDate(returnDate);
             }
         }
         return offset;
     },
--- a/calendar/base/modules/calItipUtils.jsm
+++ b/calendar/base/modules/calItipUtils.jsm
@@ -977,17 +977,17 @@ function setReceivedInfo(item, itipItemI
     let wrappedItem = cal.wrapInstance(item, Components.interfaces.calIAttendee);
     item.setProperty(wrappedItem ? "RECEIVED-SEQUENCE"
                                  : "X-MOZ-RECEIVED-SEQUENCE",
                                  String(cal.itip.getSequence(itipItemItem)));
     let dtstamp = cal.itip.getStamp(itipItemItem);
     if (dtstamp) {
         item.setProperty(wrappedItem ? "RECEIVED-DTSTAMP"
                                      : "X-MOZ-RECEIVED-DTSTAMP",
-                                     dtstamp.getInTimezone(cal.UTC()).icalString);
+                                     dtstamp.getInTimezone(cal.dtz.UTC).icalString);
     }
 }
 
 /**
  * Strips user specific data, e.g. categories and alarm settings and returns the stripped item.
  */
 function stripUserData(item_) {
     let item = item_.clone();
--- a/calendar/base/modules/calPrintUtils.jsm
+++ b/calendar/base/modules/calPrintUtils.jsm
@@ -155,29 +155,29 @@ cal.print = {
     /**
      * Get time interval string for the given item. Returns an empty string for all-day items.
      *
      * @param aItem     The item providing the interval
      * @return          The string describing the interval
      */
     getItemIntervalString: function(aItem, aBoxDate) {
         // omit time label for all-day items
-        let startDate = aItem[cal.calGetStartDateProp(aItem)];
-        let endDate = aItem[cal.calGetEndDateProp(aItem)];
+        let startDate = aItem[cal.dtz.startDateProp(aItem)];
+        let endDate = aItem[cal.dtz.endDateProp(aItem)];
         if ((startDate && startDate.isDate) || (endDate && endDate.isDate)) {
             return "";
         }
 
         // check for tasks without start and/or due date
         if (!startDate || !endDate) {
             return cal.getDateFormatter().formatItemTimeInterval(aItem);
         }
 
         let dateFormatter = cal.getDateFormatter();
-        let defaultTimezone = cal.calendarDefaultTimezone();
+        let defaultTimezone = cal.dtz.defaultTimezone;
         startDate = startDate.getInTimezone(defaultTimezone);
         endDate = endDate.getInTimezone(defaultTimezone);
         let start = startDate.clone();
         let end = endDate.clone();
         start.isDate = true;
         end.isDate = true;
         if (start.compare(end) == 0) {
             // Events that start and end in the same day.
--- a/calendar/base/modules/calProviderUtils.jsm
+++ b/calendar/base/modules/calProviderUtils.jsm
@@ -333,17 +333,17 @@ cal.fromRFC3339 = function(aStr, aTimezo
         dateTime.minute = matches[6];
         dateTime.second = matches[7];
     }
 
     // Timezone handling
     if (matches[9] == "Z" || matches[9] == "z") {
         // If the dates timezone is "Z" or "z", then this is UTC, no matter
         // what timezone was passed
-        dateTime.timezone = cal.UTC();
+        dateTime.timezone = cal.dtz.UTC;
     } else if (matches[9] == null) {
         // We have no timezone info, only a date. We have no way to
         // know what timezone we are in, so lets assume we are in the
         // timezone of our local calendar, or whatever was passed.
 
         dateTime.timezone = aTimezone;
     } else {
         let offset_in_s = (matches[11] == "-" ? -1 : 1) *
@@ -365,17 +365,17 @@ cal.fromRFC3339 = function(aStr, aTimezo
                 let id = enumerator.getNext();
                 dateTime.timezone = tzService.getTimezone(id);
                 if (dateTime.timezoneOffset == offset_in_s) {
                     // This is our last step, so go ahead and return
                     return dateTime;
                 }
             }
             // We are still here: no timezone was found
-            dateTime.timezone = cal.UTC();
+            dateTime.timezone = cal.dtz.UTC;
             if (!dateTime.isDate) {
                 dateTime.hour += (matches[11] == "-" ? -1 : 1) * matches[12];
                 dateTime.minute += (matches[11] == "-" ? -1 : 1) * matches[13];
             }
         }
     }
     return dateTime;
 };
--- a/calendar/base/modules/calRecurrenceUtils.jsm
+++ b/calendar/base/modules/calRecurrenceUtils.jsm
@@ -302,17 +302,17 @@ function recurrenceRule2String(recurrenc
                 } else {
                     let month = getRString("repeatDetailsMonth" + (startDate.month + 1));
                     let yearlyString = getRString("yearlyNthOn", [month, startDate.day]);
                     ruleString = PluralForm.get(rule.interval, yearlyString)
                                            .replace("#3", rule.interval);
                 }
             }
 
-            let kDefaultTimezone = cal.calendarDefaultTimezone();
+            let kDefaultTimezone = cal.dtz.defaultTimezone;
 
             let detailsString;
             if (!endDate || allDay) {
                 if (rule.isFinite) {
                     if (rule.isByCount) {
                         let countString = getRString("repeatCountAllDay", [
                             ruleString,
                             dateFormatter.formatDateShort(startDate)
--- a/calendar/base/modules/calUtils.jsm
+++ b/calendar/base/modules/calUtils.jsm
@@ -761,60 +761,60 @@ var cal = {
      * moves an item to another startDate
      *
      * @param aOldItem             The Item to be modified
      * @param aNewDate             The date at which the new item is going to start
      * @return                     The modified item
      */
     moveItem: function(aOldItem, aNewDate) {
         let newItem = aOldItem.clone();
-        let start = (aOldItem[cal.calGetStartDateProp(aOldItem)] ||
-                     aOldItem[cal.calGetEndDateProp(aOldItem)]).clone();
+        let start = (aOldItem[cal.dtz.startDateProp(aOldItem)] ||
+                     aOldItem[cal.dtz.endDateProp(aOldItem)]).clone();
         let isDate = start.isDate;
         start.resetTo(aNewDate.year, aNewDate.month, aNewDate.day,
                       start.hour, start.minute, start.second,
                       start.timezone);
         start.isDate = isDate;
-        if (newItem[cal.calGetStartDateProp(newItem)]) {
-            newItem[cal.calGetStartDateProp(newItem)] = start;
+        if (newItem[cal.dtz.startDateProp(newItem)]) {
+            newItem[cal.dtz.startDateProp(newItem)] = start;
             let oldDuration = aOldItem.duration;
             if (oldDuration) {
-                let oldEnd = aOldItem[cal.calGetEndDateProp(aOldItem)];
+                let oldEnd = aOldItem[cal.dtz.endDateProp(aOldItem)];
                 let newEnd = start.clone();
                 newEnd.addDuration(oldDuration);
                 newEnd = newEnd.getInTimezone(oldEnd.timezone);
-                newItem[cal.calGetEndDateProp(newItem)] = newEnd;
+                newItem[cal.dtz.endDateProp(newItem)] = newEnd;
             }
-        } else if (newItem[cal.calGetEndDateProp(newItem)]) {
-            newItem[cal.calGetEndDateProp(newItem)] = start;
+        } else if (newItem[cal.dtz.endDateProp(newItem)]) {
+            newItem[cal.dtz.endDateProp(newItem)] = start;
         }
         return newItem;
     },
 
     /**
      * sets the 'isDate' property of an item
      *
      * @param aItem         The Item to be modified
      * @param aIsDate       True or false indicating the new value of 'isDate'
      * @return              The modified item
      */
     setItemToAllDay: function(aItem, aIsDate) {
-        let start = aItem[cal.calGetStartDateProp(aItem)];
-        let end = aItem[cal.calGetEndDateProp(aItem)];
+        let start = aItem[cal.dtz.startDateProp(aItem)];
+        let end = aItem[cal.dtz.endDateProp(aItem)];
         if (start || end) {
             let item = aItem.clone();
             if (start && (start.isDate != aIsDate)) {
                 start = start.clone();
                 start.isDate = aIsDate;
-                item[cal.calGetStartDateProp(item)] = start;
+                item[cal.dtz.startDateProp(item)] = start;
             }
             if (end && (end.isDate != aIsDate)) {
                 end = end.clone();
                 end.isDate = aIsDate;
-                item[cal.calGetEndDateProp(item)] = end;
+                item[cal.dtz.endDateProp(item)] = end;
             }
             return item;
         } else {
             return aItem;
         }
     },
 
     /**
--- a/calendar/base/src/calAlarm.js
+++ b/calendar/base/src/calAlarm.js
@@ -392,17 +392,17 @@ calAlarm.prototype = {
         actionProp.value = this.action;
         comp.addProperty(actionProp);
 
         // Set up trigger (REQUIRED)
         let triggerProp = icssvc.createIcalProperty("TRIGGER");
         if (this.related == ALARM_RELATED_ABSOLUTE && this.mAbsoluteDate) {
             // Set the trigger to a specific datetime
             triggerProp.setParameter("VALUE", "DATE-TIME");
-            triggerProp.valueAsDatetime = this.mAbsoluteDate.getInTimezone(cal.UTC());
+            triggerProp.valueAsDatetime = this.mAbsoluteDate.getInTimezone(cal.dtz.UTC);
         } else if (this.related != ALARM_RELATED_ABSOLUTE && this.mOffset) {
             triggerProp.valueAsIcalString = this.mOffset.icalString;
             if (this.related == ALARM_RELATED_END) {
                 // An alarm related to the end of the event.
                 triggerProp.setParameter("RELATED", "END");
             }
         } else {
             // No offset or absolute date is not valid.
@@ -635,17 +635,17 @@ calAlarm.prototype = {
                 return aPrefix;
             }
         }
 
         if (this.related == ALARM_RELATED_ABSOLUTE && this.mAbsoluteDate) {
             // this is an absolute alarm. Use the calendar default timezone and
             // format it.
             let formatter = cal.getDateFormatter();
-            let formatDate = this.mAbsoluteDate.getInTimezone(cal.calendarDefaultTimezone());
+            let formatDate = this.mAbsoluteDate.getInTimezone(cal.dtz.defaultTimezone);
             return formatter.formatDateTime(formatDate);
         } else if (this.related != ALARM_RELATED_ABSOLUTE && this.mOffset) {
             // Relative alarm length
             let alarmlen = Math.abs(this.mOffset.inSeconds / 60);
             if (alarmlen == 0) {
                 // No need to get the other information if the alarm is at the start
                 // of the event/task.
                 if (this.related == ALARM_RELATED_START) {
--- a/calendar/base/src/calAlarmService.js
+++ b/calendar/base/src/calAlarmService.js
@@ -7,17 +7,17 @@ Components.utils.import("resource://cale
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 Components.utils.import("resource://gre/modules/Preferences.jsm");
 Components.utils.import("resource://gre/modules/PromiseUtils.jsm");
 
 var kHoursBetweenUpdates = 6;
 
 function nowUTC() {
-    return cal.jsDateToDateTime(new Date()).getInTimezone(cal.UTC());
+    return cal.dtz.jsDateToDateTime(new Date()).getInTimezone(cal.dtz.UTC);
 }
 
 function newTimerWithCallback(aCallback, aDelay, aRepeating) {
     let timer = Components.classes["@mozilla.org/timer;1"]
                           .createInstance(Components.interfaces.nsITimer);
 
     timer.initWithCallback(aCallback,
                            aDelay,
@@ -138,17 +138,17 @@ calAlarmService.prototype = {
     },
 
     /**
      * calIAlarmService APIs
      */
     get timezone() {
         // TODO Do we really need this? Do we ever set the timezone to something
         // different than the default timezone?
-        return this.mTimezone || cal.calendarDefaultTimezone();
+        return this.mTimezone || cal.dtz.defaultTimezone;
     },
 
     set timezone(aTimezone) {
         return (this.mTimezone = aTimezone);
     },
 
     snoozeAlarm: function(aItem, aAlarm, aDuration) {
         // Right now we only support snoozing all alarms for the given item for
@@ -259,17 +259,17 @@ calAlarmService.prototype = {
                     this.alarmService.mRangeStart = start.clone();
                 }
                 let until = now.clone();
                 until.month += Components.interfaces.calIAlarmService.MAX_SNOOZE_MONTHS;
 
                 // We don't set timers for every future alarm, only those within 6 hours
                 let end = now.clone();
                 end.hour += kHoursBetweenUpdates;
-                this.alarmService.mRangeEnd = end.getInTimezone(cal.UTC());
+                this.alarmService.mRangeEnd = end.getInTimezone(cal.dtz.UTC);
 
                 this.alarmService.findAlarms(cal.getCalendarManager().getCalendars({}),
                                              start, until);
             }
         };
         timerCallback.notify();
 
         this.mUpdateTimer = newTimerWithCallback(timerCallback, kHoursBetweenUpdates * 3600000, true);
@@ -338,17 +338,17 @@ calAlarmService.prototype = {
 
             // Handle all day events.  This is kinda weird, because they don't have
             // a well defined startTime.  We just consider the start/end to be
             // midnight in the user's timezone.
             if (alarmDate.isDate) {
                 alarmDate = alarmDate.getInTimezone(this.timezone);
                 alarmDate.isDate = false;
             }
-            alarmDate = alarmDate.getInTimezone(cal.UTC());
+            alarmDate = alarmDate.getInTimezone(cal.dtz.UTC);
 
             // Check for snooze
             let snoozeDate;
             if (aItem.parentItem == aItem) {
                 snoozeDate = aItem.getProperty("X-MOZ-SNOOZE-TIME");
             } else {
                 snoozeDate = aItem.parentItem.getProperty("X-MOZ-SNOOZE-TIME-" + aItem.recurrenceId.nativeTime);
             }
@@ -360,18 +360,18 @@ calAlarmService.prototype = {
             // an alarm can only be snoozed to a later time, if earlier it's from another alarm.
             if (snoozeDate && snoozeDate.compare(alarmDate) > 0) {
                 // If the alarm was snoozed, the snooze time is more important.
                 alarmDate = snoozeDate;
             }
 
             let now = nowUTC();
             if (alarmDate.timezone.isFloating) {
-                now = cal.now();
-                now.timezone = cal.floating();
+                now = cal.dtz.now();
+                now.timezone = cal.dtz.floating;
             }
 
             if (alarmDate.compare(now) >= 0) {
                 // We assume that future alarms haven't been acknowledged
                 // Delay is in msec, so don't forget to multiply
                 let timeout = alarmDate.subtractDate(now).inSeconds * 1000;
 
                 // No sense in keeping an extra timeout for an alarm thats past
--- a/calendar/base/src/calDateTimeFormatter.js
+++ b/calendar/base/src/calDateTimeFormatter.js
@@ -72,17 +72,17 @@ calDateTimeFormatter.prototype = {
     _inTimezone: function(aDate, aOptions) {
         let timezone = aDate.timezone;
         // we set the tz only if we have a valid tz - otherwise localtime will be used on formatting.
         if (timezone && (timezone.isUTC || timezone.icalComponent)) {
             aOptions.timeZone = timezone.tzid;
         }
 
         let formatter = new Services.intl.DateTimeFormat(undefined, aOptions);
-        return formatter.format(cal.dateTimeToJsDate(aDate));
+        return formatter.format(cal.dtz.dateTimeToJsDate(aDate));
     },
 
     formatTimeInterval: function(aStartDate, aEndDate) {
         if (!aStartDate && aEndDate) {
             return this.formatTime(aEndDate);
         }
         if (!aEndDate && aStartDate) {
             return this.formatTime(aStartDate);
@@ -166,19 +166,19 @@ calDateTimeFormatter.prototype = {
 
     formatDayWithOrdinal: function(aDay) {
         let ordinalSymbols = this.mDateStringBundle.GetStringFromName("dayOrdinalSymbol").split(",");
         let dayOrdinalSymbol = ordinalSymbols[aDay - 1] || ordinalSymbols[0];
         return aDay + dayOrdinalSymbol;
     },
 
     _getItemDates: function(aItem) {
-        let start = aItem[cal.calGetStartDateProp(aItem)];
-        let end = aItem[cal.calGetEndDateProp(aItem)];
-        let kDefaultTimezone = cal.calendarDefaultTimezone();
+        let start = aItem[cal.dtz.startDateProp(aItem)];
+        let end = aItem[cal.dtz.endDateProp(aItem)];
+        let kDefaultTimezone = cal.dtz.defaultTimezone;
         // Check for tasks without start and/or due date
         if (start) {
             start = start.getInTimezone(kDefaultTimezone);
         }
         if (end) {
             end = end.getInTimezone(kDefaultTimezone);
         }
         // EndDate is exclusive. For all-day events, we ened to substract one day,
--- a/calendar/base/src/calDeletedItems.js
+++ b/calendar/base/src/calDeletedItems.js
@@ -46,17 +46,17 @@ calDeletedItems.prototype = {
 
     // To make the tests more failsafe, we have an internal notifier function.
     // As the deleted items store is just meant to be a hint, this should not
     // be used in real code.
     completedNotifier: null,
 
     flush: function() {
         this.ensureStatements();
-        this.stmtFlush.params.stale_time = cal.now().nativeTime - this.STALE_TIME;
+        this.stmtFlush.params.stale_time = cal.dtz.now().nativeTime - this.STALE_TIME;
         this.stmtFlush.executeAsync(this.completedNotifier);
     },
 
     getDeletedDate: function(aId, aCalId) {
         this.ensureStatements();
         let stmt;
         if (aCalId) {
             stmt = this.stmtGetWithCal;
@@ -65,31 +65,31 @@ calDeletedItems.prototype = {
             stmt = this.stmtGet;
         }
 
         stmt.params.id = aId;
         try {
             if (stmt.executeStep()) {
                 let date = cal.createDateTime();
                 date.nativeTime = stmt.row.time_deleted;
-                return date.getInTimezone(cal.calendarDefaultTimezone());
+                return date.getInTimezone(cal.dtz.defaultTimezone);
             }
         } catch (e) {
             cal.ERROR(e);
         } finally {
             stmt.reset();
         }
         return null;
     },
 
     markDeleted: function(aItem) {
         this.ensureStatements();
         this.stmtMarkDelete.params.calId = aItem.calendar.id;
         this.stmtMarkDelete.params.id = aItem.id;
-        this.stmtMarkDelete.params.time = cal.now().nativeTime;
+        this.stmtMarkDelete.params.time = cal.dtz.now().nativeTime;
         this.stmtMarkDelete.params.rid = (aItem.recurrenceId && aItem.recurrenceId.nativeTime) || "";
         this.stmtMarkDelete.executeAsync(this.completedNotifier);
     },
 
     unmarkDeleted: function(aItem) {
         this.ensureStatements();
         this.stmtUnmarkDelete.params.id = aItem.id;
         this.stmtUnmarkDelete.executeAsync(this.completedNotifier);
--- a/calendar/base/src/calFilter.js
+++ b/calendar/base/src/calFilter.js
@@ -391,17 +391,17 @@ calFilter.prototype = {
         if (!props) {
             return false;
         }
 
         // the today and tomorrow properties are precalculated in the updateFilterDates function
         // for better performance when filtering batches of items.
         let today = this.mToday;
         if (!today) {
-            today = cal.now();
+            today = cal.dtz.now();
             today.isDate = true;
         }
 
         let tomorrow = this.mTomorrow;
         if (!tomorrow) {
             tomorrow = today.clone();
             tomorrow.day++;
         }
@@ -436,17 +436,17 @@ calFilter.prototype = {
                       !(completed && current)) &&
                      ((props.status & props.FILTER_STATUS_COMPLETED_BEFORE) ||
                       !(completed && !current));
         }
 
         // test the due property. Only applies to tasks.
         if (result && props.due != null && cal.isToDo(aItem)) {
             let due = aItem.dueDate;
-            let now = cal.now();
+            let now = cal.dtz.now();
 
             result = ((props.due & props.FILTER_DUE_PAST) ||
                       !(due && (due.compare(now) < 0))) &&
                      ((props.due & props.FILTER_DUE_TODAY) ||
                       !(due && (due.compare(now) >= 0) && (due.compare(tomorrow) < 0))) &&
                      ((props.due & props.FILTER_DUE_FUTURE) ||
                       !(due && (due.compare(tomorrow) >= 0))) &&
                      ((props.due & props.FILTER_DUE_NONE) ||
@@ -471,18 +471,18 @@ calFilter.prototype = {
      * @param start               If true, the function will return the date value for the
      *                            start of the relative date range, otherwise it will return the
      *                            date value for the end of the date range.
      * @return                    The calculated date for the property.
      */
     getDateForProperty: function(prop, start) {
         let props = this.mFilterProperties || new calFilterProperties();
         let result = null;
-        let selectedDate = this.mSelectedDate || currentView().selectedDay || cal.now();
-        let nowDate = cal.now();
+        let selectedDate = this.mSelectedDate || currentView().selectedDay || cal.dtz.now();
+        let nowDate = cal.dtz.now();
 
         if (typeof prop == "string") {
             let duration = cal.createDuration(prop);
             if (duration) {
                 result = nowDate;
                 result.addDuration(duration);
             }
         } else {
@@ -495,18 +495,18 @@ calFilter.prototype = {
                                    : currentView().endDay.clone();
                     break;
                 case props.FILTER_DATE_SELECTED:
                     result = selectedDate.clone();
                     result.isDate = true;
                     break;
                 case props.FILTER_DATE_SELECTED_OR_NOW: {
                     result = selectedDate.clone();
-                    let resultJSDate = cal.dateTimeToJsDate(result);
-                    let nowJSDate = cal.dateTimeToJsDate(nowDate);
+                    let resultJSDate = cal.dtz.dateTimeToJsDate(result);
+                    let nowJSDate = cal.dtz.dateTimeToJsDate(nowDate);
                     if ((start && resultJSDate > nowJSDate) ||
                         (!start && resultJSDate < nowJSDate)) {
                         result = nowDate;
                     }
                     result.isDate = true;
                     break;
                 }
                 case props.FILTER_DATE_NOW:
@@ -701,17 +701,17 @@ calFilter.prototype = {
      */
     updateFilterDates: function() {
         let [startDate, endDate] = this.getDatesForFilter();
         this.mStartDate = startDate;
         this.mEndDate = endDate;
 
         // the today and tomorrow properties are precalculated here
         // for better performance when filtering batches of items.
-        this.mToday = cal.now();
+        this.mToday = cal.dtz.now();
         this.mToday.isDate = true;
 
         this.mTomorrow = this.mToday.clone();
         this.mTomorrow.day++;
 
         return [startDate, endDate];
     },
 
@@ -761,17 +761,17 @@ calFilter.prototype = {
      *                            or null if no match is found.
      */
     getNextOccurrence: function(aItem) {
         if (!aItem.recurrenceInfo) {
             return this.isItemInFilters(aItem) ? aItem : null;
         }
 
         let count = 0;
-        let start = cal.now();
+        let start = cal.dtz.now();
 
         // If the base item matches the filter, we need to check each future occurrence.
         // Otherwise, we only need to check the exceptions.
         if (this.isItemInFilters(aItem)) {
             while (count++ < this.mMaxIterations) {
                 let next = aItem.recurrenceInfo.getNextOccurrence(start);
                 if (!next) {
                     // there are no more occurrences
@@ -787,17 +787,17 @@ calFilter.prototype = {
             cal.WARN("[calFilter] getNextOccurrence: reached maximum iterations for " + aItem.title);
             return null;
         } else {
             // the parent item doesn't match the filter, we can return the first future exception
             // that matches the filter
             let exMatch = null;
             aItem.recurrenceInfo.getExceptionIds({}).forEach(function(rID) {
                 let ex = aItem.recurrenceInfo.getExceptionFor(rID);
-                if (ex && cal.now().compare(ex.startDate || ex.entryDate) < 0 &&
+                if (ex && cal.dtz.now().compare(ex.startDate || ex.entryDate) < 0 &&
                     this.isItemInFilters(ex)) {
                     exMatch = ex;
                 }
             }, this);
             return exMatch;
         }
     },
 
@@ -820,17 +820,17 @@ calFilter.prototype = {
         if (!aItem.recurrenceInfo || (!props.occurrences && !this.mEndDate) ||
             props.occurrences == props.FILTER_OCCURRENCES_NONE) {
             // either this isn't a repeating item, the occurrence filter specifies that
             // we don't want occurrences, or we have a default occurrence filter with an
             // unbound date range, so we return just the unexpanded item.
             occs = [aItem];
         } else {
             occs = aItem.getOccurrencesBetween(this.mStartDate || cal.createDateTime(),
-                                               this.mEndDate || cal.now(), {});
+                                               this.mEndDate || cal.dtz.now(), {});
             if ((props.occurrences == props.FILTER_OCCURRENCES_PAST_AND_NEXT) &&
                 !this.mEndDate) {
                 // we have an unbound date range and the occurrence filter specifies
                 // that we also want the next matching occurrence if available.
                 let next = this.getNextOccurrence(aItem);
                 if (next) {
                     occs.push(next);
                 }
@@ -899,14 +899,14 @@ calFilter.prototype = {
         let endDate = this.endDate;
 
         // we only want occurrences returned from calICalendar.getItems() with a default
         // occurence filter property and a bound date range, otherwise the local listener
         // will handle occurrence expansion.
         if (!props.occurrences && this.endDate) {
             filter |= aCalendar.ITEM_FILTER_CLASS_OCCURRENCES;
             startDate = startDate || cal.createDateTime();
-            endDate = endDate || cal.now();
+            endDate = endDate || cal.dtz.now();
         }
 
         return aCalendar.getItems(filter, 0, startDate, endDate, listener);
     }
 };
--- a/calendar/base/src/calItemBase.js
+++ b/calendar/base/src/calItemBase.js
@@ -42,17 +42,17 @@ calItemBase.prototype = {
     /**
      * Initialize the base item's attributes. Can be called from inheriting
      * objects in their constructor.
      */
     initItemBase: function() {
         this.wrappedJSObject = this;
         this.mProperties = new cal.calPropertyBag();
         this.mPropertyParams = {};
-        this.mProperties.setProperty("CREATED", cal.jsDateToDateTime(new Date()));
+        this.mProperties.setProperty("CREATED", cal.dtz.jsDateToDateTime(new Date()));
     },
 
     /**
      * @see nsISupports
      */
     QueryInterface: XPCOMUtils.generateQI([Components.interfaces.calIItemBase]),
 
     /**
@@ -78,17 +78,17 @@ calItemBase.prototype = {
     // readonly attribute AUTF8String hashId;
     get hashId() {
         if (this.mHashId === null) {
             let rid = this.recurrenceId;
             let calendar = this.calendar;
             // some unused delim character:
             this.mHashId = [
                 encodeURIComponent(this.id),
-                rid ? rid.getInTimezone(cal.UTC()).icalString : "",
+                rid ? rid.getInTimezone(cal.dtz.UTC).icalString : "",
                 calendar ? encodeURIComponent(calendar.id) : ""
             ].join("#");
         }
         return this.mHashId;
     },
 
     // attribute AUTF8String id;
     get id() {
@@ -173,17 +173,17 @@ calItemBase.prototype = {
     },
 
     /**
      * Makes sure the item is not dirty. If the item is dirty, properties like
      * LAST-MODIFIED and DTSTAMP are set to now.
      */
     ensureNotDirty: function() {
         if (this.mDirty) {
-            let now = cal.jsDateToDateTime(new Date());
+            let now = cal.dtz.jsDateToDateTime(new Date());
             this.setProperty("LAST-MODIFIED", now);
             this.setProperty("DTSTAMP", now);
             this.mDirty = false;
         }
     },
 
     /**
      * Makes all properties of the base item immutable. Can be called by
@@ -322,17 +322,17 @@ calItemBase.prototype = {
 
     // attribute calIDateTime alarmLastAck;
     get alarmLastAck() {
         return this.mAlarmLastAck;
     },
     set alarmLastAck(aValue) {
         this.modify();
         if (aValue && !aValue.timezone.isUTC) {
-            aValue = aValue.getInTimezone(cal.UTC());
+            aValue = aValue.getInTimezone(cal.dtz.UTC);
         }
         return (this.mAlarmLastAck = aValue);
     },
 
     // readonly attribute calIDateTime lastModifiedTime;
     get lastModifiedTime() {
         this.ensureNotDirty();
         return this.getProperty("LAST-MODIFIED");
--- a/calendar/base/src/calRecurrenceInfo.js
+++ b/calendar/base/src/calRecurrenceInfo.js
@@ -6,17 +6,17 @@ Components.utils.import("resource://cale
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 function getRidKey(date) {
     if (!date) {
         return null;
     }
     let timezone = date.timezone;
     if (!timezone.isUTC && !timezone.isFloating) {
-        date = date.getInTimezone(cal.UTC());
+        date = date.getInTimezone(cal.dtz.UTC);
     }
     return date.icalString;
 }
 
 function calRecurrenceInfo() {
     this.mRecurrenceItems = [];
     this.mExceptionMap = {};
 
@@ -423,18 +423,18 @@ calRecurrenceInfo.prototype = {
         this.ensureBaseItem();
         this.ensureSortedRecurrenceRules();
 
         function ridDateSortComptor(a, b) {
             return a.rstart.compare(b.rstart);
         }
 
         // workaround for UTC- timezones
-        let rangeStart = cal.ensureDateTime(aRangeStart);
-        let rangeEnd = cal.ensureDateTime(aRangeEnd);
+        let rangeStart = cal.dtz.ensureDateTime(aRangeStart);
+        let rangeEnd = cal.dtz.ensureDateTime(aRangeEnd);
 
         // If aRangeStart falls in the middle of an occurrence, libical will
         // not return that occurrence when we go and ask for an
         // icalrecur_iterator_new.  This actually seems fairly rational, so
         // instead of hacking libical, I'm going to move aRangeStart back far
         // enough to make sure we get the occurrences we might miss.
         let searchStart = rangeStart.clone();
         let baseDuration = this.mBaseItem.duration;
@@ -739,17 +739,17 @@ calRecurrenceInfo.prototype = {
         cal.ASSERT(aNewStartTime, "invalid arg!", true);
 
         // no need to check for changes if there's no previous starttime.
         if (!aOldStartTime) {
             return;
         }
 
         // convert both dates to UTC since subtractDate is not timezone aware.
-        let timeDiff = aNewStartTime.getInTimezone(cal.UTC()).subtractDate(aOldStartTime.getInTimezone(cal.UTC()));
+        let timeDiff = aNewStartTime.getInTimezone(cal.dtz.UTC).subtractDate(aOldStartTime.getInTimezone(cal.dtz.UTC));
 
         let rdates = {};
 
         // take RDATE's and EXDATE's into account.
         const kCalIRecurrenceDate = Components.interfaces.calIRecurrenceDate;
         let ritems = this.getRecurrenceItems({});
         for (let ritem of ritems) {
             let rDateInstance = cal.wrapInstance(ritem, kCalIRecurrenceDate);
--- a/calendar/base/src/calTimezoneService.js
+++ b/calendar/base/src/calTimezoneService.js
@@ -439,17 +439,17 @@ function guessSystemTimezone() {
             (beforeSpringShiftJSDate.getTimezoneOffset() >
              afterSpringShiftJSDate.getTimezoneOffset())) {
             return 1;
         }
         // no match
         return 0;
     }
 
-    const todayUTC = cal.jsDateToDateTime(new Date());
+    const todayUTC = cal.dtz.jsDateToDateTime(new Date());
     const oneYrUTC = todayUTC.clone(); oneYrUTC.year += 1;
     const periodStartCalDate = cal.createDateTime();
     const periodUntilCalDate = cal.createDateTime(); // until timezone is UTC
     const periodCalRule = cal.createRecurrenceRule();
     const untilRegex = /UNTIL=(\d{8}T\d{6}Z)/;
 
     function findCurrentTimePeriod(timezone, subComp, standardOrDaylight,
                                    isForNextTransitionDate) {
@@ -480,26 +480,26 @@ function guessSystemTimezone() {
             } // else no daylight rule
 
             // found period that covers today.
             if (!isForNextTransitionDate) {
                 return period;
             } else if (todayUTC.nativeTime < periodStartCalDate.nativeTime) {
                 // already know periodStartCalDate < oneYr from now,
                 // and transitions are at most once per year, so it is next.
-                return cal.dateTimeToJsDate(periodStartCalDate);
+                return cal.dtz.dateTimeToJsDate(periodStartCalDate);
             } else if (rrule) {
                 // find next occurrence after today
                 periodCalRule.icalProperty = rrule;
                 let nextTransitionDate =
                     periodCalRule.getNextOccurrence(periodStartCalDate,
                                                     todayUTC);
                 // make sure rule doesn't end before next transition date.
                 if (nextTransitionDate) {
-                    return cal.dateTimeToJsDate(nextTransitionDate);
+                    return cal.dtz.dateTimeToJsDate(nextTransitionDate);
                 }
             }
         }
         // no such period found
         return null;
     }
 
     function environmentVariableValue(varName) {
@@ -561,17 +561,17 @@ function guessSystemTimezone() {
             Components.utils.reportError(filepath + ": " + ex);
             return "";
         }
     }
 
     function weekday(icsDate, timezone) {
         let calDate = cal.createDateTime(icsDate);
         calDate.timezone = timezone;
-        return cal.dateTimeToJsDate(calDate).toLocaleString(undefined, { weekday: "short" });
+        return cal.dtz.dateTimeToJsDate(calDate).toLocaleString(undefined, { weekday: "short" });
     }
 
     // Try to find a tz that matches OS/JSDate timezone.  If no name match,
     // will use first of probable timezone(s) with highest score.
     let probableTZId = "floating"; // default fallback tz if no tz matches.
     let probableTZScore = 0;
     let probableTZSource = null;
 
--- a/calendar/base/src/calTodo.js
+++ b/calendar/base/src/calTodo.js
@@ -73,17 +73,17 @@ calTodo.prototype = {
         return this.completedDate != null ||
                this.percentComplete == 100 ||
                this.status == "COMPLETED";
     },
 
     set isCompleted(completed) {
         if (completed) {
             if (!this.completedDate) {
-                this.completedDate = cal.jsDateToDateTime(new Date());
+                this.completedDate = cal.dtz.jsDateToDateTime(new Date());
             }
             this.status = "COMPLETED";
             this.percentComplete = 100;
         } else {
             this.deleteProperty("COMPLETED");
             this.deleteProperty("STATUS");
             this.deleteProperty("PERCENT-COMPLETE");
         }
--- a/calendar/base/src/calUtils.js
+++ b/calendar/base/src/calUtils.js
@@ -672,17 +672,17 @@ function getContrastingTextColor(bgColor
  * @param rangeStart         (inclusive) range start or null (open range)
  * @param rangeStart         (exclusive) range end or null (open range)
  * @param returnDtstartOrDue returns item's start (or due) date in case
  *                           the item is in the specified Range; null otherwise.
  */
 function checkIfInRange(item, rangeStart, rangeEnd, returnDtstartOrDue) {
     let startDate;
     let endDate;
-    let queryStart = cal.ensureDateTime(rangeStart);
+    let queryStart = cal.dtz.ensureDateTime(rangeStart);
     if (isEvent(item)) {
         startDate = item.startDate;
         if (!startDate) { // DTSTART mandatory
             // xxx todo: should we assert this case?
             return null;
         }
         endDate = item.endDate || startDate;
     } else {
@@ -691,28 +691,28 @@ function checkIfInRange(item, rangeStart
         if (!item.entryDate) {
             if (returnDtstartOrDue) { // DTSTART or DUE mandatory
                 return null;
             }
             // 3.6.2. To-do Component
             // A "VTODO" calendar component without the "DTSTART" and "DUE" (or
             // "DURATION") properties specifies a to-do that will be associated
             // with each successive calendar date, until it is completed.
-            let completedDate = cal.ensureDateTime(item.completedDate);
-            dueDate = cal.ensureDateTime(dueDate);
+            let completedDate = cal.dtz.ensureDateTime(item.completedDate);
+            dueDate = cal.dtz.ensureDateTime(dueDate);
             return !completedDate || !queryStart ||
                    completedDate.compare(queryStart) > 0 ||
                    (dueDate && dueDate.compare(queryStart) >= 0);
         }
         endDate = dueDate || startDate;
     }
 
-    let start = cal.ensureDateTime(startDate);
-    let end = cal.ensureDateTime(endDate);
-    let queryEnd = cal.ensureDateTime(rangeEnd);
+    let start = cal.dtz.ensureDateTime(startDate);
+    let end = cal.dtz.ensureDateTime(endDate);
+    let queryEnd = cal.dtz.ensureDateTime(rangeEnd);
 
     if (start.compare(end) == 0) {
         if ((!queryStart || start.compare(queryStart) >= 0) &&
             (!queryEnd || start.compare(queryEnd) < 0)) {
             return startDate;
         }
     } else if ((!queryEnd || start.compare(queryEnd) < 0) &&
                (!queryStart || end.compare(queryStart) > 0)) {
@@ -735,27 +735,27 @@ function getProgressAtom(aTask) {
         return "repeating";
     }
 
     if (aTask.isCompleted) {
         return "completed";
     }
 
     if (aTask.dueDate && aTask.dueDate.isValid) {
-        if (cal.dateTimeToJsDate(aTask.dueDate).getTime() < nowdate.getTime()) {
+        if (cal.dtz.dateTimeToJsDate(aTask.dueDate).getTime() < nowdate.getTime()) {
             return "overdue";
         } else if (aTask.dueDate.year == nowdate.getFullYear() &&
                    aTask.dueDate.month == nowdate.getMonth() &&
                    aTask.dueDate.day == nowdate.getDate()) {
             return "duetoday";
         }
     }
 
     if (aTask.entryDate && aTask.entryDate.isValid &&
-        cal.dateTimeToJsDate(aTask.entryDate).getTime() < nowdate.getTime()) {
+        cal.dtz.dateTimeToJsDate(aTask.entryDate).getTime() < nowdate.getTime()) {
         return "inprogress";
     }
 
     return "future";
 }
 
 function calInterfaceBag(iid) {
     this.init(iid);
--- a/calendar/import-export/calHtmlExport.js
+++ b/calendar/import-export/calHtmlExport.js
@@ -41,21 +41,21 @@ calHtmlExporter.prototype = {
 
     exportToStream: function(aStream, aCount, aItems, aTitle) {
         let document = cal.xml.parseFile("chrome://calendar-common/skin/printing/calHtmlExport.html");
         let itemContainer = document.getElementById("item-container");
         document.getElementById("title").textContent = aTitle || cal.calGetString("calendar", "HTMLTitle");
 
         // Sort aItems
         aItems.sort((a, b) => {
-            let start_a = a[cal.calGetStartDateProp(a)];
+            let start_a = a[cal.dtz.startDateProp(a)];
             if (!start_a) {
                 return -1;
             }
-            let start_b = b[cal.calGetStartDateProp(b)];
+            let start_b = b[cal.dtz.startDateProp(b)];
             if (!start_b) {
                 return 1;
             }
             return start_a.compare(start_b);
         });
 
         for (let item of aItems) {
             let itemNode = document.getElementById("item-template").cloneNode(true);
@@ -70,18 +70,18 @@ calHtmlExporter.prototype = {
                     let row = itemNode.querySelector("." + classKey + "row");
                     if (row.nextSibling instanceof Components.interfaces.nsIDOMText) {
                         row.nextSibling.remove();
                     }
                     row.remove();
                 }
             };
 
-            let startDate = item[cal.calGetStartDateProp(item)];
-            let endDate = item[cal.calGetEndDateProp(item)];
+            let startDate = item[cal.dtz.startDateProp(item)];
+            let endDate = item[cal.dtz.endDateProp(item)];
             if (startDate || endDate) {
                 // This is a task with a start or due date, format accordingly
                 let prefixWhen = cal.calGetString("calendar", "htmlPrefixWhen");
                 itemNode.querySelector(".intervalkey").textContent = prefixWhen;
 
                 let startNode = itemNode.querySelector(".dtstart");
                 let dateString = cal.getDateFormatter().formatItemInterval(item);
                 startNode.setAttribute("title", startDate ? startDate.icalString : "none");
--- a/calendar/import-export/calMonthGridPrinter.js
+++ b/calendar/import-export/calMonthGridPrinter.js
@@ -28,17 +28,17 @@ calMonthPrinter.prototype = {
         classDescription: "Calendar Month Grid Print Formatter",
         interfaces: calMonthPrinterInterfaces
     }),
 
     get name() { return cal.calGetString("calendar", "monthPrinterName"); },
 
     formatToHtml: function(aStream, aStart, aEnd, aCount, aItems, aTitle) {
         let document = cal.xml.parseFile("chrome://calendar-common/skin/printing/calMonthGridPrinter.html");
-        let defaultTimezone = cal.calendarDefaultTimezone();
+        let defaultTimezone = cal.dtz.defaultTimezone;
 
         // Set page title
         document.getElementById("title").textContent = aTitle;
 
         // Table that maps YYYY-MM-DD to the DOM node container where items are to be added
         let dayTable = {};
 
         // Make sure to create tables from start to end, if passed
@@ -51,18 +51,18 @@ calMonthPrinter.prototype = {
             for (let current = startDate.clone();
                  weekInfoService.getEndOfWeek(current.endOfMonth).compare(endDate) < 0;
                  current.month += 1) {
                 this.setupMonth(document, current, dayTable);
             }
         }
 
         for (let item of aItems) {
-            let itemStartDate = item[cal.calGetStartDateProp(item)] || item[cal.calGetEndDateProp(item)];
-            let itemEndDate = item[cal.calGetEndDateProp(item)] || item[cal.calGetStartDateProp(item)];
+            let itemStartDate = item[cal.dtz.startDateProp(item)] || item[cal.dtz.endDateProp(item)];
+            let itemEndDate = item[cal.dtz.endDateProp(item)] || item[cal.dtz.startDateProp(item)];
 
             if (!itemStartDate && !itemEndDate) {
                 cal.print.addItemToDayboxNodate(document, item);
                 continue;
             }
             itemStartDate = itemStartDate.getInTimezone(defaultTimezone);
             itemEndDate = itemEndDate.getInTimezone(defaultTimezone);
 
--- a/calendar/import-export/calOutlookCSVImportExport.js
+++ b/calendar/import-export/calOutlookCSVImportExport.js
@@ -366,17 +366,17 @@ calOutlookCSVImporter.prototype = {
         aCount.value = eventArray.length;
         return eventArray;
     },
 
     parseDateTime: function(aDate, aTime, aLocale) {
         let date = cal.createDateTime();
 
         // XXX Can we do better?
-        date.timezone = cal.floating();
+        date.timezone = cal.dtz.floating;
 
         let datepart = aLocale.dateRe.exec(aDate);
         let timepart = aLocale.timeRe.exec(aTime);
 
         if (!datepart) {
             return null;
         }
 
@@ -424,20 +424,20 @@ calOutlookCSVExporter.prototype = {
         interfaces: calOutlookCSVExporterInterfaces
     }),
 
     getFileTypes: getOutlookCsvFileTypes,
 
     exportToStream: function(aStream, aCount, aItems) {
         // Helper functions
         function dateString(aDateTime) {
-            return cal.dateTimeToJsDate(aDateTime).toLocaleString("en-US", localeEn.dateFormat);
+            return cal.dtz.dateTimeToJsDate(aDateTime).toLocaleString("en-US", localeEn.dateFormat);
         }
         function timeString(aDateTime) {
-            return cal.dateTimeToJsDate(aDateTime).toLocaleString("en-US", localeEn.timeFormat);
+            return cal.dtz.dateTimeToJsDate(aDateTime).toLocaleString("en-US", localeEn.timeFormat);
         }
         function txtString(aString) { return aString || ""; }
 
         let headers = [];
         // Not using a loop here, since we need to be sure the order here matches
         // with the orders the field data is added later on
         headers.push(localeEn.headTitle);
         headers.push(localeEn.headStartDate);
--- a/calendar/import-export/calWeekPrinter.js
+++ b/calendar/import-export/calWeekPrinter.js
@@ -28,35 +28,35 @@ calWeekPrinter.prototype = {
         classDescription: "Calendar Week Print Formatter",
         interfaces: calWeekPrinterInterfaces
     }),
 
     get name() { return cal.calGetString("calendar", "weekPrinterName"); },
 
     formatToHtml: function(aStream, aStart, aEnd, aCount, aItems, aTitle) {
         let document = cal.xml.parseFile("chrome://calendar-common/skin/printing/calWeekPrinter.html");
-        let defaultTimezone = cal.calendarDefaultTimezone();
+        let defaultTimezone = cal.dtz.defaultTimezone;
 
         // Set page title
         document.getElementById("title").textContent = aTitle;
 
         // Table that maps YYYY-MM-DD to the DOM node container where items are to be added
         let dayTable = {};
         let weekInfoService = cal.getWeekInfoService();
 
         // Make sure to create tables from start to end, if passed
         if (aStart && aEnd) {
             for (let current = weekInfoService.getStartOfWeek(aStart); current.compare(aEnd) < 0; current.day += 7) {
                 this.setupWeek(document, current, dayTable);
             }
         }
 
         for (let item of aItems) {
-            let itemStartDate = item[cal.calGetStartDateProp(item)] || item[cal.calGetEndDateProp(item)];
-            let itemEndDate = item[cal.calGetEndDateProp(item)] || item[cal.calGetStartDateProp(item)];
+            let itemStartDate = item[cal.dtz.startDateProp(item)] || item[cal.dtz.endDateProp(item)];
+            let itemEndDate = item[cal.dtz.endDateProp(item)] || item[cal.dtz.startDateProp(item)];
 
             if (!itemStartDate && !itemEndDate) {
                 cal.print.addItemToDayboxNodate(document, item);
                 continue;
             }
             itemStartDate = itemStartDate.getInTimezone(defaultTimezone);
             itemEndDate = itemEndDate.getInTimezone(defaultTimezone);
 
@@ -94,17 +94,17 @@ calWeekPrinter.prototype = {
         convStream.writeString(html);
     },
 
     setupWeek: function(document, startOfWeek, dayTable) {
         const weekdayMap = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
 
         let weekTemplate = document.getElementById("week-template");
         let weekContainer = document.getElementById("week-container");
-        let defaultTimezone = cal.calendarDefaultTimezone();
+        let defaultTimezone = cal.dtz.defaultTimezone;
 
         // Clone the template week and make sure it doesn't have an id
         let currentPage = weekTemplate.cloneNode(true);
         currentPage.removeAttribute("id");
         currentPage.item = startOfWeek.clone();
 
         // Set up the week number title
         let weekInfo = cal.getWeekInfoService();
--- a/calendar/lightning/content/lightning-item-iframe.js
+++ b/calendar/lightning/content/lightning-item-iframe.js
@@ -362,17 +362,17 @@ function onLoad() {
 
     window.recurrenceInfo = null;
     if (parentItem.recurrenceInfo) {
         window.recurrenceInfo = parentItem.recurrenceInfo.clone();
     }
 
     // Set initial values for datepickers in New Tasks dialog
     if (cal.isToDo(item)) {
-        let initialDatesValue = cal.dateTimeToJsDate(args.initialStartDateValue);
+        let initialDatesValue = cal.dtz.dateTimeToJsDate(args.initialStartDateValue);
         if (!gNewItemUI) {
             setElementValue("completed-date-picker", initialDatesValue);
             setElementValue("todo-entrydate", initialDatesValue);
             setElementValue("todo-duedate", initialDatesValue);
         }
     }
     loadDialog(window.calendarItem);
 
@@ -658,17 +658,17 @@ function loadDialog(aItem) {
         itemProps.initialDescription = aItem.getProperty("DESCRIPTION");
     } else {
         setElementValue("item-description", aItem.getProperty("DESCRIPTION"));
     }
 
     // Task completed date
     if (!gNewItemUI) {
         if (aItem.completedDate) {
-            updateToDoStatus(aItem.status, cal.dateTimeToJsDate(aItem.completedDate));
+            updateToDoStatus(aItem.status, cal.dtz.dateTimeToJsDate(aItem.completedDate));
         } else {
             updateToDoStatus(aItem.status);
         }
     }
 
     // Task percent complete
     if (cal.isToDo(aItem)) {
         let percentCompleteInteger = 0;
@@ -886,17 +886,17 @@ function saveCategories(aItem) {
 }
 
 /**
  * Sets up all date related controls from the passed item
  *
  * @param item      The item to parse information out of.
  */
 function loadDateTime(item) {
-    let kDefaultTimezone = cal.calendarDefaultTimezone();
+    let kDefaultTimezone = cal.dtz.defaultTimezone;
     if (cal.isEvent(item)) {
         let startTime = item.startDate;
         let endTime = item.endDate;
         let duration = endTime.subtractDate(startTime);
 
         // Check if an all-day event has been passed in (to adapt endDate).
         if (startTime.isDate) {
             startTime = startTime.clone();
@@ -1003,27 +1003,27 @@ function dateTimeControls2State(aStartDa
             gItemDuration = null;
         }
         startWidgetId = "todo-entrydate";
         endWidgetId = "todo-duedate";
     }
 
     let saveStartTime = gStartTime;
     let saveEndTime = gEndTime;
-    let kDefaultTimezone = cal.calendarDefaultTimezone();
+    let kDefaultTimezone = cal.dtz.defaultTimezone;
 
     if (gStartTime) {
         // jsDate is always in OS timezone, thus we create a calIDateTime
         // object from the jsDate representation then we convert the timezone
         // in order to keep gStartTime in default timezone.
         if (gTimezonesEnabled || allDay) {
-            gStartTime = cal.jsDateToDateTime(getElementValue(startWidgetId), gStartTimezone);
+            gStartTime = cal.dtz.jsDateToDateTime(getElementValue(startWidgetId), gStartTimezone);
             gStartTime = gStartTime.getInTimezone(kDefaultTimezone);
         } else {
-            gStartTime = cal.jsDateToDateTime(getElementValue(startWidgetId), kDefaultTimezone);
+            gStartTime = cal.dtz.jsDateToDateTime(getElementValue(startWidgetId), kDefaultTimezone);
         }
         gStartTime.isDate = allDay;
     }
     if (gEndTime) {
         if (aStartDatepicker) {
             // Change the End date in order to keep the duration.
             gEndTime = gStartTime.clone();
             if (gItemDuration) {
@@ -1032,20 +1032,20 @@ function dateTimeControls2State(aStartDa
         } else {
             let timezone = gEndTimezone;
             if (timezone.isUTC) {
                 if (gStartTime && !cal.compareObjects(gStartTimezone, gEndTimezone)) {
                     timezone = gStartTimezone;
                 }
             }
             if (gTimezonesEnabled || allDay) {
-                gEndTime = cal.jsDateToDateTime(getElementValue(endWidgetId), timezone);
+                gEndTime = cal.dtz.jsDateToDateTime(getElementValue(endWidgetId), timezone);
                 gEndTime = gEndTime.getInTimezone(kDefaultTimezone);
             } else {
-                gEndTime = cal.jsDateToDateTime(getElementValue(endWidgetId), kDefaultTimezone);
+                gEndTime = cal.dtz.jsDateToDateTime(getElementValue(endWidgetId), kDefaultTimezone);
             }
             gEndTime.isDate = allDay;
             if (keepAttribute && gItemDuration) {
                 // Keepduration-button links the the Start to the End date. We
                 // have to change the Start date in order to keep the duration.
                 let fduration = gItemDuration.clone();
                 fduration.isNegative = true;
                 gStartTime = gEndTime.clone();
@@ -1077,17 +1077,17 @@ function dateTimeControls2State(aStartDa
 
     let startChanged = false;
     if (gStartTime && saveStartTime) {
         startChanged = gStartTime.compare(saveStartTime) != 0;
     }
     // Preset the date in the until-datepicker's minimonth to the new start
     // date if it has changed.
     if (startChanged) {
-        let startDate = cal.dateTimeToJsDate(gStartTime.getInTimezone(cal.floating()));
+        let startDate = cal.dtz.dateTimeToJsDate(gStartTime.getInTimezone(cal.dtz.floating));
         document.getElementById("repeat-until-datepicker").extraDate = startDate;
     }
 
     // Sort out and verify the until date if the start date has changed.
     if (gUntilDate && startChanged) {
         // Make the time part of the until date equal to the time of start date.
         updateUntildateRecRule();
 
@@ -1101,17 +1101,17 @@ function dateTimeControls2State(aStartDa
             let rrules = splitRecurrenceRules(window.recurrenceInfo);
             recRule = rrules[0][0];
             recRule.untilDate = gUntilDate.clone();
             // Update the until-date-picker. In case of "custom" rule, the
             // recurrence string is going to be changed by updateDateTime() below.
             let notCustomRule = document.getElementById("repeat-deck").selectedIndex == 0;
             if (notCustomRule) {
                 setElementValue("repeat-until-datepicker",
-                                cal.dateTimeToJsDate(gUntilDate.getInTimezone(cal.floating())));
+                                cal.dtz.dateTimeToJsDate(gUntilDate.getInTimezone(cal.dtz.floating)));
             }
 
             warning = true;
             stringWarning = cal.calGetString("calendar", "warningUntilDateBeforeStart");
         }
     }
 
     updateDateTime();
@@ -1189,28 +1189,28 @@ function updateDateCheckboxes(aDatePicke
     setElementValue(aDatePickerId, getElementValue(aDatePickerId));
 
     // first of all disable the datetime picker if we don't have a date
     let hasDate = getElementValue(aCheckboxId, "checked");
     setElementValue(aDatePickerId, !hasDate, "disabled");
 
     // create a new datetime object if date is now checked for the first time
     if (hasDate && !aDateTime.isValid()) {
-        let date = cal.jsDateToDateTime(getElementValue(aDatePickerId), cal.calendarDefaultTimezone());
+        let date = cal.dtz.jsDateToDateTime(getElementValue(aDatePickerId), cal.dtz.defaultTimezone);
         aDateTime.setDateTime(date);
     } else if (!hasDate && aDateTime.isValid()) {
         aDateTime.setDateTime(null);
     }
 
     // calculate the duration if possible
     let hasEntryDate = getElementValue("todo-has-entrydate", "checked");
     let hasDueDate = getElementValue("todo-has-duedate", "checked");
     if (hasEntryDate && hasDueDate) {
-        let start = cal.jsDateToDateTime(getElementValue("todo-entrydate"));
-        let end = cal.jsDateToDateTime(getElementValue("todo-duedate"));
+        let start = cal.dtz.jsDateToDateTime(getElementValue("todo-entrydate"));
+        let end = cal.dtz.jsDateToDateTime(getElementValue("todo-duedate"));
         gItemDuration = end.subtractDate(start);
     } else {
         gItemDuration = null;
     }
     setBooleanAttribute("keepduration-button", "disabled", !(hasEntryDate && hasDueDate));
     updateDateTime();
     updateTimezone();
 }
@@ -1229,18 +1229,18 @@ function getRepeatTypeAndUntilDate(aItem
     /**
      * Updates the until date (locally and globally).
      *
      * @param aRule  The recurrence rule
      */
     let updateUntilDate = (aRule) => {
         if (!aRule.isByCount) {
             if (aRule.isFinite) {
-                gUntilDate = aRule.untilDate.clone().getInTimezone(cal.calendarDefaultTimezone());
-                untilDate = cal.dateTimeToJsDate(gUntilDate.getInTimezone(cal.floating()));
+                gUntilDate = aRule.untilDate.clone().getInTimezone(cal.dtz.defaultTimezone);
+                untilDate = cal.dtz.dateTimeToJsDate(gUntilDate.getInTimezone(cal.dtz.floating));
             } else {
                 gUntilDate = null;
             }
         }
     };
 
     if (recurrenceInfo) {
         repeatType = "custom";
@@ -1454,17 +1454,17 @@ function saveDialog(item) {
         item.deleteProperty("TRANSP");
     }
 
     // Privacy
     cal.setItemProperty(item, "CLASS", gConfig.privacy, "privacy");
 
     if (item.status == "COMPLETED" && cal.isToDo(item)) {
         let elementValue = getElementValue("completed-date-picker");
-        item.completedDate = cal.jsDateToDateTime(elementValue);
+        item.completedDate = cal.dtz.jsDateToDateTime(elementValue);
     }
 
     saveReminder(item);
 }
 
 /**
  * Save date and time related values from the dialog to the passed item.
  *
@@ -1506,17 +1506,17 @@ function saveDateTime(item) {
  * correction caused by the function onStartDateChange() when saving the
  * item.
  * It allows to keep the until date set in the dialog irrespective of the
  * changes that the user has done to the start date.
  */
 function untilDateCompensation(aItem) {
     // The current start date in the item is always the date that we get
     // when opening the dialog or after the last save.
-    let startDate = aItem[cal.calGetStartDateProp(aItem)];
+    let startDate = aItem[cal.dtz.startDateProp(aItem)];
 
     if (aItem.recurrenceInfo) {
         let rrules = splitRecurrenceRules(aItem.recurrenceInfo);
         let rule = rrules[0][0];
         if (!rule.isByCount && rule.isFinite && startDate) {
             let compensation = startDate.subtractDate(gStartTime);
             if (compensation != "PT0S") {
                 let untilDate = rule.untilDate.clone();
@@ -1547,30 +1547,30 @@ function updateTitle() {
 
 /**
  * Update the disabled status of the accept button. The button is enabled if all
  * parts of the dialog have options selected that make sense.
  * constraining factors like
  */
 function updateAccept() {
     let enableAccept = true;
-    let kDefaultTimezone = cal.calendarDefaultTimezone();
+    let kDefaultTimezone = cal.dtz.defaultTimezone;
     let startDate;
     let endDate;
     let isEvent = cal.isEvent(window.calendarItem);
 
     // don't allow for end dates to be before start dates
     if (isEvent) {
-        startDate = cal.jsDateToDateTime(getElementValue("event-starttime"));
-        endDate = cal.jsDateToDateTime(getElementValue("event-endtime"));
+        startDate = cal.dtz.jsDateToDateTime(getElementValue("event-starttime"));
+        endDate = cal.dtz.jsDateToDateTime(getElementValue("event-endtime"));
     } else {
         startDate = getElementValue("todo-has-entrydate", "checked") ?
-            cal.jsDateToDateTime(getElementValue("todo-entrydate")) : null;
+            cal.dtz.jsDateToDateTime(getElementValue("todo-entrydate")) : null;
         endDate = getElementValue("todo-has-duedate", "checked") ?
-            cal.jsDateToDateTime(getElementValue("todo-duedate")) : null;
+            cal.dtz.jsDateToDateTime(getElementValue("todo-duedate")) : null;
     }
 
     if (startDate && endDate) {
         if (gTimezonesEnabled) {
             let startTimezone = gStartTimezone;
             let endTimezone = gEndTimezone;
             if (endTimezone.isUTC) {
                 if (!cal.compareObjects(gStartTimezone, gEndTimezone)) {
@@ -1636,17 +1636,17 @@ var gOldEndTimezone = null;
  * Handler function to update controls and state in consequence of the "all
  * day" checkbox being clicked.
  */
 function onUpdateAllDay() {
     if (!cal.isEvent(window.calendarItem)) {
         return;
     }
     let allDay = getElementValue("event-all-day", "checked");
-    let kDefaultTimezone = cal.calendarDefaultTimezone();
+    let kDefaultTimezone = cal.dtz.defaultTimezone;
 
     if (allDay) {
         // Store date-times and related timezones so we can restore
         // if the user unchecks the "all day" checkbox.
         gOldStartTime = gStartTime.clone();
         gOldEndTime = gEndTime.clone();
         gOldStartTimezone = gStartTimezone;
         gOldEndTimezone = gEndTimezone;
@@ -1663,17 +1663,17 @@ function onUpdateAllDay() {
             }
         }
     } else {
         gStartTime.isDate = false;
         gEndTime.isDate = false;
         if (!gOldStartTime && !gOldEndTime) {
             // The checkbox has been unchecked for the first time, the event
             // was an "All day" type, so we have to set default values.
-            gStartTime.hour = cal.getDefaultStartDate(window.initialStartDateValue).hour;
+            gStartTime.hour = cal.dtz.getDefaultStartDate(window.initialStartDateValue).hour;
             gEndTime.hour = gStartTime.hour;
             gEndTime.minute += Preferences.get("calendar.event.defaultlength", 60);
             gOldStartTimezone = kDefaultTimezone;
             gOldEndTimezone = kDefaultTimezone;
         } else {
             // Restore date-times previously stored.
             gStartTime.hour = gOldStartTime.hour;
             gStartTime.minute = gOldStartTime.minute;
@@ -1681,18 +1681,18 @@ function onUpdateAllDay() {
             gEndTime.minute = gOldEndTime.minute;
             // When we restore 0:00 as end time, we need to add one day to
             // the end date in order to include the last day until midnight.
             if (gEndTime.hour == 0 && gEndTime.minute == 0) {
                 gEndTime.day++;
             }
         }
     }
-    gStartTimezone = (allDay ? cal.floating() : gOldStartTimezone);
-    gEndTimezone = (allDay ? cal.floating() : gOldEndTimezone);
+    gStartTimezone = (allDay ? cal.dtz.floating : gOldStartTimezone);
+    gEndTimezone = (allDay ? cal.dtz.floating : gOldEndTimezone);
     setShowTimeAs(allDay);
 
     updateAllDay();
 }
 
 /**
  * This function sets the enabled/disabled state of the following controls:
  * - 'event-starttime'
@@ -1784,17 +1784,17 @@ function editAttendees() {
                     organizer.commonName = null;
                 }
             }
             savedWindow.organizer = organizer;
         }
         let duration = endTime.subtractDate(startTime);
         startTime = startTime.clone();
         endTime = endTime.clone();
-        let kDefaultTimezone = cal.calendarDefaultTimezone();
+        let kDefaultTimezone = cal.dtz.defaultTimezone;
         gStartTimezone = startTime.timezone;
         gEndTimezone = endTime.timezone;
         gStartTime = startTime.getInTimezone(kDefaultTimezone);
         gEndTime = endTime.getInTimezone(kDefaultTimezone);
         gItemDuration = duration;
         updateAttendees();
         updateDateTime();
         updateAllDay();
@@ -2439,17 +2439,17 @@ function updateCalendar() {
 
         let collapseElements = document.getElementsByAttribute("collapse-on-readonly", "true");
         for (let element of collapseElements) {
             element.removeAttribute("collapsed");
         }
 
         // Task completed date
         if (item.completedDate) {
-            updateToDoStatus(item.status, cal.dateTimeToJsDate(item.completedDate));
+            updateToDoStatus(item.status, cal.dtz.dateTimeToJsDate(item.completedDate));
         } else {
             updateToDoStatus(item.status);
         }
 
         // disable repeat menupopup if this is an occurrence
         item = window.calendarItem;
         if (item.parentItem != item) {
             disableElement("item-repeat");
@@ -2578,17 +2578,17 @@ function updateRepeat(aSuppressDialogs, 
 
         // Assign gUntilDate on the first run or when returning from the
         // edit recurrence dialog.
         if (window.recurrenceInfo) {
             let rrules = splitRecurrenceRules(window.recurrenceInfo);
             let rule = rrules[0][0];
             gUntilDate = null;
             if (!rule.isByCount && rule.isFinite) {
-                gUntilDate = rule.untilDate.clone().getInTimezone(cal.calendarDefaultTimezone());
+                gUntilDate = rule.untilDate.clone().getInTimezone(cal.dtz.defaultTimezone);
             }
         }
 
         // we need to address two separate cases here.
         // 1)- We need to revoke the selection of the repeat
         //     drop down list in case the user didn't specify
         //     a new repeat pattern (i.e. canceled the dialog);
         //   - re-enable the 'has entrydate' option in case
@@ -2632,32 +2632,32 @@ function updateRepeat(aSuppressDialogs, 
 
             // If the previous rule was "custom" we have to recover the until
             // date, or the last occurrence's date in order to set the
             // repeat-until-datepicker with the same date.
             if (aItemRepeatCall && repeatDeck.selectedIndex == 1) {
                 let repeatDate;
                 if (!rule.isByCount || !rule.isFinite) {
                     if (rule.isFinite) {
-                        repeatDate = rule.untilDate.getInTimezone(cal.floating());
-                        repeatDate = cal.dateTimeToJsDate(repeatDate);
+                        repeatDate = rule.untilDate.getInTimezone(cal.dtz.floating);
+                        repeatDate = cal.dtz.dateTimeToJsDate(repeatDate);
                     } else {
                         repeatDate = "forever";
                     }
                 } else {
                     // Try to recover the last occurrence in 10(?) years.
                     let endDate = gStartTime.clone();
                     endDate.year += 10;
                     let lastOccurrenceDate = null;
                     let dates = recurrenceInfo.getOccurrenceDates(gStartTime, endDate, 0, {});
                     if (dates) {
                         lastOccurrenceDate = dates[dates.length - 1];
                     }
-                    repeatDate = (lastOccurrenceDate || proposedUntilDate).getInTimezone(cal.floating());
-                    repeatDate = cal.dateTimeToJsDate(repeatDate);
+                    repeatDate = (lastOccurrenceDate || proposedUntilDate).getInTimezone(cal.dtz.floating);
+                    repeatDate = cal.dtz.dateTimeToJsDate(repeatDate);
                 }
                 setElementValue("repeat-until-datepicker", repeatDate);
             }
             if (rrules[0].length > 0) {
                 recurrenceInfo.deleteRecurrenceItem(rule);
             }
         } else {
             // New event proposes "forever" as default until date.
@@ -2701,17 +2701,17 @@ function updateRepeat(aSuppressDialogs, 
         if (cal.isToDo(item)) {
             if (!getElementValue("todo-has-entrydate", "checked")) {
                 setElementValue("todo-has-entrydate", "true", "checked");
             }
             disableElementWithLock("todo-has-entrydate", "repeat-lock");
         }
 
         // Preset the until-datepicker's minimonth to the start date.
-        let startDate = cal.dateTimeToJsDate(gStartTime.getInTimezone(cal.floating()));
+        let startDate = cal.dtz.dateTimeToJsDate(gStartTime.getInTimezone(cal.dtz.floating));
         document.getElementById("repeat-until-datepicker").extraDate = startDate;
     }
 
     gLastRepeatSelection = repeatMenu.selectedIndex;
     repeatMenu.setAttribute("last-value", repeatValue);
 
     updateRepeatDetails();
     updateEntryDate();
@@ -2729,28 +2729,28 @@ function updateUntildateRecRule(recRule)
     if (!recRule) {
         let recurrenceInfo = window.recurrenceInfo;
         if (!recurrenceInfo) {
             return;
         }
         let rrules = splitRecurrenceRules(recurrenceInfo);
         recRule = rrules[0][0];
     }
-    let defaultTimezone = cal.calendarDefaultTimezone();
+    let defaultTimezone = cal.dtz.defaultTimezone;
     let repeatUntilDate = null;
 
     let itemRepeat = document.getElementById("item-repeat").selectedItem.value;
     if (itemRepeat == "none") {
         return;
     } else if (itemRepeat == "custom") {
         repeatUntilDate = gUntilDate;
     } else {
         let untilDatepickerDate = getElementValue("repeat-until-datepicker");
         if (untilDatepickerDate != "forever") {
-            repeatUntilDate = cal.jsDateToDateTime(untilDatepickerDate, defaultTimezone);
+            repeatUntilDate = cal.dtz.jsDateToDateTime(untilDatepickerDate, defaultTimezone);
         }
     }
 
     if (repeatUntilDate) {
         if (onLoad.hasLoaded) {
             repeatUntilDate.isDate = gStartTime.isDate; // Enforce same value type as DTSTART
             if (!gStartTime.isDate) {
                 repeatUntilDate.hour = gStartTime.hour;
@@ -3158,18 +3158,18 @@ function showTimezonePopup(event, dateTi
     // the opening node is disabled.
     if (event.button != 0 || event.target.disabled) {
         return;
     }
 
     let timezonePopup = document.getElementById("timezone-popup");
     let timezoneDefaultItem = document.getElementById("timezone-popup-defaulttz");
     let timezoneSeparator = document.getElementById("timezone-popup-menuseparator");
-    let defaultTimezone = cal.calendarDefaultTimezone();
-    let recentTimezones = cal.getRecentTimezones(true);
+    let defaultTimezone = cal.dtz.defaultTimezone;
+    let recentTimezones = cal.dtz.getRecentTimezones(true);
 
     // Set up the right editTimezone function, so the custom item can use it.
     timezonePopup.editTimezone = editFunc;
     timezonePopup.dateTime = dateTime;
 
     // Set up the default timezone item
     timezoneDefaultItem.value = defaultTimezone.tzid;
     timezoneDefaultItem.label = defaultTimezone.displayName;
@@ -3205,17 +3205,17 @@ function editTimezone(aElementId, aDateT
         return;
     }
 
     // prepare the arguments that will be passed to the dialog
     let args = {};
     args.time = aDateTime;
     args.calendar = getCurrentCalendar();
     args.onOk = function(datetime) {
-        cal.saveRecentTimezone(datetime.timezone.tzid);
+        cal.dtz.saveRecentTimezone(datetime.timezone.tzid);
         return aCallback(datetime);
     };
 
     // open the dialog modally
     openDialog(
         "chrome://calendar/content/calendar-event-dialog-timezone.xul",
         "_blank",
         "chrome,titlebar,modal,resizable",
@@ -3262,113 +3262,113 @@ function updateDateTime() {
                         endTime = endTime.getInTimezone(startTime.timezone);
                     }
                 }
             }
 
             // before feeding the date/time value into the control we need
             // to set the timezone to 'floating' in order to avoid the
             // automatic conversion back into the OS timezone.
-            startTime.timezone = cal.floating();
-            endTime.timezone = cal.floating();
-
-            setElementValue("event-starttime", cal.dateTimeToJsDate(startTime));
-            setElementValue("event-endtime", cal.dateTimeToJsDate(endTime));
+            startTime.timezone = cal.dtz.floating;
+            endTime.timezone = cal.dtz.floating;
+
+            setElementValue("event-starttime", cal.dtz.dateTimeToJsDate(startTime));
+            setElementValue("event-endtime", cal.dtz.dateTimeToJsDate(endTime));
         }
 
         if (cal.isToDo(item)) {
             let startTime = gStartTime && gStartTime.getInTimezone(gStartTimezone);
             let endTime = gEndTime && gEndTime.getInTimezone(gEndTimezone);
             let hasEntryDate = (startTime != null);
             let hasDueDate = (endTime != null);
 
             if (hasEntryDate && hasDueDate) {
                 setElementValue("todo-has-entrydate", hasEntryDate, "checked");
-                startTime.timezone = cal.floating();
-                setElementValue("todo-entrydate", cal.dateTimeToJsDate(startTime));
+                startTime.timezone = cal.dtz.floating;
+                setElementValue("todo-entrydate", cal.dtz.dateTimeToJsDate(startTime));
 
                 setElementValue("todo-has-duedate", hasDueDate, "checked");
-                endTime.timezone = cal.floating();
-                setElementValue("todo-duedate", cal.dateTimeToJsDate(endTime));
+                endTime.timezone = cal.dtz.floating;
+                setElementValue("todo-duedate", cal.dtz.dateTimeToJsDate(endTime));
             } else if (hasEntryDate) {
                 setElementValue("todo-has-entrydate", hasEntryDate, "checked");
-                startTime.timezone = cal.floating();
-                setElementValue("todo-entrydate", cal.dateTimeToJsDate(startTime));
-
-                startTime.timezone = cal.floating();
-                setElementValue("todo-duedate", cal.dateTimeToJsDate(startTime));
+                startTime.timezone = cal.dtz.floating;
+                setElementValue("todo-entrydate", cal.dtz.dateTimeToJsDate(startTime));
+
+                startTime.timezone = cal.dtz.floating;
+                setElementValue("todo-duedate", cal.dtz.dateTimeToJsDate(startTime));
             } else if (hasDueDate) {
-                endTime.timezone = cal.floating();
-                setElementValue("todo-entrydate", cal.dateTimeToJsDate(endTime));
+                endTime.timezone = cal.dtz.floating;
+                setElementValue("todo-entrydate", cal.dtz.dateTimeToJsDate(endTime));
 
                 setElementValue("todo-has-duedate", hasDueDate, "checked");
-                endTime.timezone = cal.floating();
-                setElementValue("todo-duedate", cal.dateTimeToJsDate(endTime));
+                endTime.timezone = cal.dtz.floating;
+                setElementValue("todo-duedate", cal.dtz.dateTimeToJsDate(endTime));
             } else {
                 startTime = window.initialStartDateValue;
-                startTime.timezone = cal.floating();
+                startTime.timezone = cal.dtz.floating;
                 endTime = startTime.clone();
 
-                setElementValue("todo-entrydate", cal.dateTimeToJsDate(startTime));
-                setElementValue("todo-duedate", cal.dateTimeToJsDate(endTime));
+                setElementValue("todo-entrydate", cal.dtz.dateTimeToJsDate(startTime));
+                setElementValue("todo-duedate", cal.dtz.dateTimeToJsDate(endTime));
             }
         }
     } else {
-        let kDefaultTimezone = cal.calendarDefaultTimezone();
+        let kDefaultTimezone = cal.dtz.defaultTimezone;
 
         if (cal.isEvent(item)) {
             let startTime = gStartTime.getInTimezone(kDefaultTimezone);
             let endTime = gEndTime.getInTimezone(kDefaultTimezone);
             setElementValue("event-all-day", startTime.isDate, "checked");
 
             // before feeding the date/time value into the control we need
             // to set the timezone to 'floating' in order to avoid the
             // automatic conversion back into the OS timezone.
-            startTime.timezone = cal.floating();
-            endTime.timezone = cal.floating();
-            setElementValue("event-starttime", cal.dateTimeToJsDate(startTime));
-            setElementValue("event-endtime", cal.dateTimeToJsDate(endTime));
+            startTime.timezone = cal.dtz.floating;
+            endTime.timezone = cal.dtz.floating;
+            setElementValue("event-starttime", cal.dtz.dateTimeToJsDate(startTime));
+            setElementValue("event-endtime", cal.dtz.dateTimeToJsDate(endTime));
         }
 
         if (cal.isToDo(item)) {
             let startTime = gStartTime &&
                             gStartTime.getInTimezone(kDefaultTimezone);
             let endTime = gEndTime && gEndTime.getInTimezone(kDefaultTimezone);
             let hasEntryDate = (startTime != null);
             let hasDueDate = (endTime != null);
 
             if (hasEntryDate && hasDueDate) {
                 setElementValue("todo-has-entrydate", hasEntryDate, "checked");
-                startTime.timezone = cal.floating();
-                setElementValue("todo-entrydate", cal.dateTimeToJsDate(startTime));
+                startTime.timezone = cal.dtz.floating;
+                setElementValue("todo-entrydate", cal.dtz.dateTimeToJsDate(startTime));
 
                 setElementValue("todo-has-duedate", hasDueDate, "checked");
-                endTime.timezone = cal.floating();
-                setElementValue("todo-duedate", cal.dateTimeToJsDate(endTime));
+                endTime.timezone = cal.dtz.floating;
+                setElementValue("todo-duedate", cal.dtz.dateTimeToJsDate(endTime));
             } else if (hasEntryDate) {
                 setElementValue("todo-has-entrydate", hasEntryDate, "checked");
-                startTime.timezone = cal.floating();
-                setElementValue("todo-entrydate", cal.dateTimeToJsDate(startTime));
-
-                startTime.timezone = cal.floating();
-                setElementValue("todo-duedate", cal.dateTimeToJsDate(startTime));
+                startTime.timezone = cal.dtz.floating;
+                setElementValue("todo-entrydate", cal.dtz.dateTimeToJsDate(startTime));
+
+                startTime.timezone = cal.dtz.floating;
+                setElementValue("todo-duedate", cal.dtz.dateTimeToJsDate(startTime));
             } else if (hasDueDate) {
-                endTime.timezone = cal.floating();
-                setElementValue("todo-entrydate", cal.dateTimeToJsDate(endTime));
+                endTime.timezone = cal.dtz.floating;
+                setElementValue("todo-entrydate", cal.dtz.dateTimeToJsDate(endTime));
 
                 setElementValue("todo-has-duedate", hasDueDate, "checked");
-                endTime.timezone = cal.floating();
-                setElementValue("todo-duedate", cal.dateTimeToJsDate(endTime));
+                endTime.timezone = cal.dtz.floating;
+                setElementValue("todo-duedate", cal.dtz.dateTimeToJsDate(endTime));
             } else {
                 startTime = window.initialStartDateValue;
-                startTime.timezone = cal.floating();
+                startTime.timezone = cal.dtz.floating;
                 endTime = startTime.clone();
 
-                setElementValue("todo-entrydate", cal.dateTimeToJsDate(startTime));
-                setElementValue("todo-duedate", cal.dateTimeToJsDate(endTime));
+                setElementValue("todo-entrydate", cal.dtz.dateTimeToJsDate(startTime));
+                setElementValue("todo-duedate", cal.dtz.dateTimeToJsDate(endTime));
             }
         }
     }
 
     updateTimezone();
     updateAllDay();
     updateRepeatDetails();
 
@@ -3575,23 +3575,23 @@ function updateRepeatDetails() {
         // First of all collapse the details text. If we fail to
         // create a details string, we simply don't show anything.
         // this could happen if the repeat rule is something exotic
         // we don't have any strings prepared for.
         let repeatDetails = document.getElementById("repeat-details");
         repeatDetails.setAttribute("collapsed", "true");
 
         // Try to create a descriptive string from the rule(s).
-        let kDefaultTimezone = cal.calendarDefaultTimezone();
+        let kDefaultTimezone = cal.dtz.defaultTimezone;
         let event = cal.isEvent(item);
 
         let startDate = getElementValue(event ? "event-starttime" : "todo-entrydate");
         let endDate = getElementValue(event ? "event-endtime" : "todo-duedate");
-        startDate = cal.jsDateToDateTime(startDate, kDefaultTimezone);
-        endDate = cal.jsDateToDateTime(endDate, kDefaultTimezone);
+        startDate = cal.dtz.jsDateToDateTime(startDate, kDefaultTimezone);
+        endDate = cal.dtz.jsDateToDateTime(endDate, kDefaultTimezone);
 
         let allDay = getElementValue("event-all-day", "checked");
         let detailsString = recurrenceRule2String(recurrenceInfo, startDate,
                                                   endDate, allDay);
 
         if (!detailsString) {
             detailsString = cal.calGetString("calendar-event-dialog", "ruleTooComplex");
         }
@@ -3814,24 +3814,24 @@ function checkUntilDate() {
     let repeatUntilDate = getElementValue("repeat-until-datepicker");
     if (repeatUntilDate == "forever") {
         updateRepeat();
         // "forever" is never earlier than another date.
         return;
     }
 
     // Check whether the date is valid. Set the correct time just in this case.
-    let untilDate = cal.jsDateToDateTime(repeatUntilDate, gStartTime.timezone);
+    let untilDate = cal.dtz.jsDateToDateTime(repeatUntilDate, gStartTime.timezone);
     let startDate = gStartTime.clone();
     startDate.isDate = true;
     if (untilDate.compare(startDate) < 0) {
         // Invalid date: restore the previous date. Since we are checking an
         // until date, a null value for gUntilDate means repeat "forever".
         setElementValue("repeat-until-datepicker",
-                        gUntilDate ? cal.dateTimeToJsDate(gUntilDate.getInTimezone(cal.floating()))
+                        gUntilDate ? cal.dtz.dateTimeToJsDate(gUntilDate.getInTimezone(cal.dtz.floating))
                                    : "forever");
         gWarning = true;
         let callback = function() {
             // Disable the "Save" and "Save and Close" commands as long as the
             // warning dialog is showed.
             enableAcceptCommand(false);
 
             Services.prompt.alert(
@@ -3976,17 +3976,17 @@ function lookupCounterLabel(aProperty) {
  * @returns {String|null}             The value to display or null if the property is not supported
  */
 function formatCounterValue(aProperty) {
     const dateProps = ["DTSTART", "DTEND"];
     const stringProps = ["SUMMARY", "LOCATION"];
 
     let val;
     if (dateProps.includes(aProperty.property)) {
-        let localTime = aProperty.proposed.getInTimezone(cal.calendarDefaultTimezone());
+        let localTime = aProperty.proposed.getInTimezone(cal.dtz.defaultTimezone);
         let formatter = cal.getDateFormatter();
         val = formatter.formatDateTime(localTime);
         if (gTimezonesEnabled) {
             let tzone = localTime.timezone.displayName || localTime.timezone.tzid;
             val += " " + tzone;
         }
     } else if (stringProps.includes(aProperty.property)) {
         val = aProperty.proposed;
@@ -4030,16 +4030,16 @@ function applyValues(aType) {
     }
     let nodeIds = getPropertyMap();
     window.counterProposal.proposal.forEach(aProperty => {
         if (aProperty.property != "COMMENT") {
             let valueNode = nodeIds.has(aProperty.property) &&
                             document.getElementById(nodeIds.get(aProperty.property));
             if (valueNode) {
                 if (["DTSTART", "DTEND"].includes(aProperty.property)) {
-                    valueNode.value = cal.dateTimeToJsDate(aProperty[aType]);
+                    valueNode.value = cal.dtz.dateTimeToJsDate(aProperty[aType]);
                 } else {
                     valueNode.value = aProperty[aType];
                 }
             }
         }
     });
 }
--- a/calendar/lightning/content/messenger-overlay-sidebar.js
+++ b/calendar/lightning/content/messenger-overlay-sidebar.js
@@ -327,17 +327,17 @@ var calendarItemTabType = {
      * @param {Object} aTabmail  The tabmail interface
      * @param {Object} aState    The state of the tab to restore
      */
     restoreTab: function(aTabmail, aState) {
         // Sometimes restoreTab is called for tabs that were never saved
         // and never meant to be persisted or restored. See persistTab.
         if (aState.args && aState.calendarId && aState.itemId) {
             aState.args.initialStartDateValue = aState.initialStartDate
-                ? cal.createDateTime(aState.initialStartDate) : cal.getDefaultStartDate();
+                ? cal.createDateTime(aState.initialStartDate) : cal.dtz.getDefaultStartDate();
 
             aState.args.onOk = doTransaction.bind(null, "modify");
 
             aState.args.calendar = cal.getCalendarManager().getCalendarById(aState.calendarId);
             if (aState.args.calendar) {
                 // using wrappedJSObject is a hack that is needed to prevent a proxy error
                 let pcal = cal.async.promisifyCalendar(aState.args.calendar.wrappedJSObject);
                 pcal.getItem(aState.itemId).then((item) => {
@@ -549,17 +549,17 @@ function refreshUIBits() {
         ];
         for (let view of views) {
             if (view != currView.id) {
                 document.getElementById(view).mToggleStatus = -1;
             }
         }
 
         if (!TodayPane.showsToday()) {
-            TodayPane.setDay(cal.now());
+            TodayPane.setDay(cal.dtz.now());
         }
 
         // update the unifinder
         refreshEventTree();
 
         // update today's date on todaypane button
         document.getElementById("calendar-status-todaypane-button").setUpTodayDate();
     } catch (exc) {
--- a/calendar/lightning/content/messenger-overlay-sidebar.xul
+++ b/calendar/lightning/content/messenger-overlay-sidebar.xul
@@ -78,17 +78,17 @@
       <command id="switch2task"
                oncommand="document.getElementById('tabmail').openTab('tasks', { title: document.getElementById('task-tab-button').getAttribute('title') })"/>
       <command id="new_calendar_tab"
                oncommand="document.getElementById('tabmail').openTab('calendar', { title: document.getElementById('calendar-tab-button').getAttribute('title') })"/>
       <command id="new_task_tab"
                oncommand="document.getElementById('tabmail').openTab('tasks', { title: document.getElementById('task-tab-button').getAttribute('title') })"/>
       <command id="calendar_go_to_today_command"
                observes="calendar_mode_calendar"
-               oncommand="document.getElementById('tabmail').openTab('calendar', { title: document.getElementById('calendar-tab-button').getAttribute('title') }); goToDate(cal.now())"/>
+               oncommand="document.getElementById('tabmail').openTab('calendar', { title: document.getElementById('calendar-tab-button').getAttribute('title') }); goToDate(cal.dtz.now())"/>
     </commandset>
 
     <commandset id="mailCommands">
       <command id="cmd_CustomizeMailToolbar"
                oncommand="customizeMailToolbarForTabType()"/>
     </commandset>
 
     <keyset id="calendar-keys">
--- a/calendar/lightning/modules/ltnInvitationUtils.jsm
+++ b/calendar/lightning/modules/ltnInvitationUtils.jsm
@@ -131,17 +131,17 @@ ltn.invitation = {
         }
 
         field("summary", aEvent.title, true);
         field("location", aEvent.getProperty("LOCATION"), true);
 
         let dateString = formatter.formatItemInterval(aEvent);
 
         if (aEvent.recurrenceInfo) {
-            let kDefaultTimezone = cal.calendarDefaultTimezone();
+            let kDefaultTimezone = cal.dtz.defaultTimezone;
             let startDate = aEvent.startDate;
             let endDate = aEvent.endDate;
             startDate = startDate ? startDate.getInTimezone(kDefaultTimezone) : null;
             endDate = endDate ? endDate.getInTimezone(kDefaultTimezone) : null;
             let repeatString = recurrenceRule2String(aEvent.recurrenceInfo, startDate,
                                                      endDate, startDate.isDate);
             if (repeatString) {
                 dateString = repeatString;
@@ -469,17 +469,17 @@ ltn.invitation = {
      */
     getRfc5322FormattedDate: function(aDate = null) {
         let date = aDate || new Date();
         let str = date.toString()
                       .replace(/^(\w{3}) (\w{3}) (\d{2}) (\d{4}) ([0-9:]{8}) GMT([+-])(\d{4}).*$/,
                                "$1, $3 $2 $4 $5 $6$7");
         // according to section 3.3 of RfC5322, +0000 should be used for defined timezones using
         // UTC time, while -0000 should indicate a floating time instead
-        let timezone = cal.calendarDefaultTimezone();
+        let timezone = cal.dtz.defaultTimezone;
         if (timezone && timezone.isFloating) {
             str.replace(/\+0000$/, "-0000");
         }
         return str;
     },
 
     /**
      * Converts a given unicode text to utf-8 and normalizes line-breaks to \r\n
--- a/calendar/providers/caldav/calDavCalendar.js
+++ b/calendar/providers/caldav/calDavCalendar.js
@@ -2420,22 +2420,22 @@ calDavCalendar.prototype = {
         let organizer = this.calendarUserAddress;
 
         let fbQuery = cal.getIcsService().createIcalComponent("VCALENDAR");
         cal.calSetProdidVersion(fbQuery);
         let prop = cal.getIcsService().createIcalProperty("METHOD");
         prop.value = "REQUEST";
         fbQuery.addProperty(prop);
         let fbComp = cal.getIcsService().createIcalComponent("VFREEBUSY");
-        fbComp.stampTime = cal.now().getInTimezone(cal.UTC());
+        fbComp.stampTime = cal.dtz.now().getInTimezone(cal.dtz.UTC);
         prop = cal.getIcsService().createIcalProperty("ORGANIZER");
         prop.value = organizer;
         fbComp.addProperty(prop);
-        fbComp.startTime = aRangeStart.getInTimezone(cal.UTC());
-        fbComp.endTime = aRangeEnd.getInTimezone(cal.UTC());
+        fbComp.startTime = aRangeStart.getInTimezone(cal.dtz.UTC);
+        fbComp.endTime = aRangeEnd.getInTimezone(cal.dtz.UTC);
         fbComp.uid = cal.getUUID();
         prop = cal.getIcsService().createIcalProperty("ATTENDEE");
         prop.setParameter("PARTSTAT", "NEEDS-ACTION");
         prop.setParameter("ROLE", "REQ-PARTICIPANT");
         prop.setParameter("CUTYPE", "INDIVIDUAL");
         prop.value = mailto_aCalId;
         fbComp.addProperty(prop);
         fbQuery.addSubcomponent(fbComp);
--- a/calendar/providers/gdata/components/calGoogleCalendar.js
+++ b/calendar/providers/gdata/components/calGoogleCalendar.js
@@ -211,17 +211,17 @@ calGoogleCalendar.prototype = {
         return tasksURI;
     },
 
     getUpdatedMin: function getUpdatedMin(aWhich) {
         let updatedMin = null;
         let lastUpdated = this.getProperty("lastUpdated." + aWhich);
         if (lastUpdated) {
             updatedMin = cal.createDateTime(lastUpdated);
-            let lastWeek = cal.now();
+            let lastWeek = cal.dtz.now();
             lastWeek.day -= 7;
             if (updatedMin.compare(lastWeek) <= 0) {
                 cal.LOG("[calGoogleCalendar] Last updated time for " + aWhich +
                         " is very old, doing full sync");
                 this.resetLog();
                 updatedMin = null;
             }
         }
--- a/calendar/providers/gdata/content/gdata-calendar-event-dialog.js
+++ b/calendar/providers/gdata/content/gdata-calendar-event-dialog.js
@@ -76,21 +76,21 @@ Components.utils.import("resource://gdat
         }
 
         let duedate = document.getElementById("todo-duedate");
         let duetime = document.getAnonymousElementByAttribute(duedate, "anonid", "time-picker");
         duetime.style.display = isGoogleTask ? "none" : "";
 
         if (gEndTime) {
             if (isGoogleTask) {
-                let floating = cal.floating();
+                let floating = cal.dtz.floating;
                 if (gEndTimezone != floating) {
                   gOldEndTimezone = gEndTimezone;
                 }
-                gEndTimezone = cal.floating();
+                gEndTimezone = cal.dtz.floating;
                 gEndTime = gEndTime.getInTimezone(gEndTimezone);
                 gEndTime.isDate = true;
             } else {
                 if (gOldEndTimezone) {
                     gEndTimezone = gOldEndTimezone;
                 }
                 gEndTime.isDate = false;
                 gEndTime = gEndTime.getInTimezone(gEndTimezone);
--- a/calendar/providers/gdata/modules/gdataSession.jsm
+++ b/calendar/providers/gdata/modules/gdataSession.jsm
@@ -417,20 +417,20 @@ calGoogleSession.prototype = {
 
         if (!aCalId.includes("@") || !aCalId.includes(".") ||
             !aCalId.toLowerCase().startsWith("mailto:")) {
             // No valid email, screw it
             return failSync(Components.results.NS_ERROR_FAILURE, null);
         }
 
         if (aRangeStart) {
-            aRangeStart = aRangeStart.getInTimezone(cal.UTC());
+            aRangeStart = aRangeStart.getInTimezone(cal.dtz.UTC);
         }
         if (aRangeEnd) {
-            aRangeEnd = aRangeEnd.getInTimezone(cal.UTC());
+            aRangeEnd = aRangeEnd.getInTimezone(cal.dtz.UTC);
         }
 
         let rfcRangeStart = cal.toRFC3339(aRangeStart);
         let rfcRangeEnd = cal.toRFC3339(aRangeEnd);
         /* 7 is the length of "mailto:", we've asserted this above */
         let strippedCalId = aCalId.substr(7);
 
         let requestData = {
@@ -451,17 +451,17 @@ calGoogleSession.prototype = {
         this.asyncItemRequest(request).then(function(aData) {
             if ("calendars" in aData && strippedCalId in aData.calendars) {
                 let calData = aData.calendars[strippedCalId];
                 let reason = calData.errors && calData.errors[0] && calData.errors[0].reason;
                 if (reason) {
                     cal.LOG("[calGoogleCalendar] Could not request freebusy for " + strippedCalId + ": " + reason);
                     failSync(Components.results.NS_ERROR_FAILURE, reason);
                 } else {
-                    let utcZone = cal.UTC();
+                    let utcZone = cal.dtz.UTC;
                     cal.LOG("[calGoogleCalendar] Found " + calData.busy.length + " busy slots within range for " + strippedCalId);
                     let busyRanges = calData.busy.map(function(entry) {
                         let start = cal.fromRFC3339(entry.start, utcZone);
                         let end = cal.fromRFC3339(entry.end, utcZone);
                         let interval = new cal.FreeBusyInterval(aCalId, cIFBI.BUSY, start, end);
                         LOGinterval(interval);
                         return interval;
                     });
--- a/calendar/providers/gdata/modules/gdataUtils.jsm
+++ b/calendar/providers/gdata/modules/gdataUtils.jsm
@@ -36,17 +36,17 @@ var EXPORTED_SYMBOLS = [
  * @param aItem             The Item to get the id for.
  * @param aOfflineStorage   The offline storage that holds the metadata for this item.
  */
 function getGoogleId(aItem, aOfflineStorage) {
     let meta = getItemMetadata(aOfflineStorage, aItem) ||
                getItemMetadata(aOfflineStorage, aItem.parentItem);
     let baseId = meta ? meta.path : aItem.id.replace("@google.com", "");
     if (aItem.recurrenceId) {
-        let recSuffix = "_" + aItem.recurrenceId.getInTimezone(cal.UTC()).icalString;
+        let recSuffix = "_" + aItem.recurrenceId.getInTimezone(cal.dtz.UTC).icalString;
         if (!baseId.endsWith(recSuffix)) {
             baseId += recSuffix;
         }
     }
     return baseId;
 }
 
 /**
@@ -475,17 +475,17 @@ function EventToJSON(aItem, aOfflineStor
         itemData.recurrence = [];
         let recurrenceItems = aItem.recurrenceInfo.getRecurrenceItems({});
         for (let ritem of recurrenceItems) {
             let prop = ritem.icalProperty;
             if (ritem instanceof Components.interfaces.calIRecurrenceDate) {
                 // EXDATES require special casing, since they might contain
                 // a TZID. To avoid the need for conversion of TZID strings,
                 // convert to UTC before serialization.
-                prop.valueAsDatetime = ritem.date.getInTimezone(cal.UTC());
+                prop.valueAsDatetime = ritem.date.getInTimezone(cal.dtz.UTC);
             }
             itemData.recurrence.push(prop.icalString.trim());
         }
     } else if (aItem.recurrenceId) {
         itemData.originalStartTime = dateToJSON(aItem.recurrenceId);
         let parentMeta = getItemMetadata(aOfflineStorage, aItem.parentItem);
         itemData.recurringEventId = parentMeta ? parentMeta.path : aItem.id.replace("@google.com", "");
     }
@@ -508,17 +508,17 @@ function TaskToJSON(aItem, aOfflineStora
 
     setIf(itemData, "id", aItem.id);
     setIf(itemData, "title", aItem.title);
     setIf(itemData, "notes", aItem.getProperty("DESCRIPTION"));
     setIf(itemData, "position", aItem.getProperty("X-SORTKEY"));
     itemData.status = (aItem.isCompleted ? "completed" : "needsAction");
 
     if (aItem.dueDate) {
-        let dueDate = aItem.dueDate.getInTimezone(cal.UTC());
+        let dueDate = aItem.dueDate.getInTimezone(cal.dtz.UTC);
         dueDate.isDate = false;
         itemData.due = cal.toRFC3339(dueDate);
     }
     setIf(itemData, "completed", cal.toRFC3339(aItem.completedDate));
 
     for (let relation of aItem.getRelations({})) {
         if (relation.relId &&
             (!relation.relType || relation.relType == "PARENT")) {
@@ -674,17 +674,17 @@ function JSONToEvent(aEntry, aCalendar, 
     if (!aEntry || !("kind" in aEntry) || aEntry.kind != "calendar#event") {
         cal.ERROR("[calGoogleCalendar] Attempt to decode invalid event: " +
                   (aEntry && JSON.stringify(aEntry, null, " ")));
         return null;
     }
 
     let tzs = cal.getTimezoneService();
     let calendarZoneName = aCalendar.getProperty("settings.timeZone");
-    let calendarZone = calendarZoneName ? tzs.getTimezone(calendarZoneName) : cal.calendarDefaultTimezone();
+    let calendarZone = calendarZoneName ? tzs.getTimezone(calendarZoneName) : cal.dtz.defaultTimezone;
 
     try {
         item.id = aEntry.iCalUID || ((aEntry.recurringEventId || aEntry.id) + "@google.com");
         item.recurrenceId = JSONToDate(aEntry.originalStartTime, calendarZone);
         if (!item.recurrenceId) {
             // Sometimes recurring event instances don't have recurringEventId
             // set, but are still instances. work around by detecting the ID.
             // http://code.google.com/a/google.com/p/apps-api-issues/issues/detail?id=3199
@@ -694,17 +694,17 @@ function JSONToEvent(aEntry, aCalendar, 
         item.status = (aEntry.status ? aEntry.status.toUpperCase() : null);
         item.title = aEntry.summary;
         if (accessRole == "freeBusyReader") {
             item.title = getProviderString("busyTitle", aCalendar.name);
         }
         item.privacy = (aEntry.visibility ? aEntry.visibility.toUpperCase() : null);
 
         item.setProperty("URL", aEntry.htmlLink && aCalendar.uri.schemeIs("https") ? aEntry.htmlLink.replace(/^http:/, "https:") : aEntry.htmlLink);
-        item.setProperty("CREATED", (aEntry.created ? cal.fromRFC3339(aEntry.created, calendarZone).getInTimezone(cal.UTC()) : null));
+        item.setProperty("CREATED", (aEntry.created ? cal.fromRFC3339(aEntry.created, calendarZone).getInTimezone(cal.dtz.UTC) : null));
         item.setProperty("DESCRIPTION", aEntry.description);
         item.setProperty("LOCATION", aEntry.location);
         item.setProperty("TRANSP", (aEntry.transparency ? aEntry.transparency.toUpperCase() : null));
         item.setProperty("SEQUENCE", aEntry.sequence);
         aMetadata.etag = aEntry.etag;
         aMetadata.path = aEntry.id;
 
         // organizer
@@ -822,17 +822,17 @@ function JSONToEvent(aEntry, aCalendar, 
         // Google does not support categories natively, but allows us to store
         // data as an "extendedProperty", and here it's going to be retrieved
         // again
         let categories = cal.categoriesStringToArray(sharedProps["X-MOZ-CATEGORIES"]);
         item.setCategories(categories.length, categories);
 
         // updated (This must be set last!)
         if (aEntry.updated) {
-            let updated = cal.fromRFC3339(aEntry.updated, calendarZone).getInTimezone(cal.UTC());
+            let updated = cal.fromRFC3339(aEntry.updated, calendarZone).getInTimezone(cal.dtz.UTC);
             item.setProperty("DTSTAMP", updated);
             item.setProperty("LAST-MODIFIED", updated);
         }
     } catch (e) {
         cal.ERROR(stringException(e));
         throw e;
     }
     return item;
@@ -854,33 +854,33 @@ function JSONToTask(aEntry, aCalendar, a
                   (aEntry && JSON.stringify(aEntry, null, " ")));
         return null;
     }
     let item = cal.createTodo();
     item.calendar = aCalendar.superCalendar;
 
     let tzs = cal.getTimezoneService();
     let calendarZoneName = aCalendar.getProperty("settings.timeZone");
-    let calendarZone = calendarZoneName ? tzs.getTimezone(calendarZoneName) : cal.calendarDefaultTimezone();
+    let calendarZone = calendarZoneName ? tzs.getTimezone(calendarZoneName) : cal.dtz.defaultTimezone;
 
     try {
         item.id = aEntry.id;
         item.title = aEntry.title || "";
         item.setProperty("DESCRIPTION", aEntry.notes);
         item.setProperty("X-GOOGLE-SORTKEY", aEntry.position);
         item.isCompleted = (aEntry.status == "completed");
 
         aMetadata.etag = aEntry.etag;
         aMetadata.path = aEntry.id;
 
         // Google Tasks don't have a due time, but still use 0:00 UTC. They
         // should really be using floating time.
-        item.dueDate = cal.fromRFC3339(aEntry.due, cal.floating())
+        item.dueDate = cal.fromRFC3339(aEntry.due, cal.dtz.floating)
         if (item.dueDate) {
-            item.dueDate.timezone = cal.floating();
+            item.dueDate.timezone = cal.dtz.floating;
             item.dueDate.isDate = true;
         }
         item.completedDate = cal.fromRFC3339(aEntry.completed, calendarZone);
         if (aEntry.deleted) {
             item.status = "CANCELLED";
         } else if (aEntry.status == "needsAction") {
             item.status = "NEEDS-ACTION";
         } else {
@@ -900,18 +900,18 @@ function JSONToTask(aEntry, aCalendar, a
                 attach.uri = Services.io.newURI(link.link);
                 attach.setParameter("FILENAME", link.description);
                 attach.setParameter("X-GOOGLE-TYPE", link.type);
                 item.addAttachment(attach);
             }
         }
 
         // updated (This must be set last!)
-        item.setProperty("DTSTAMP", cal.fromRFC3339(aEntry.updated, calendarZone).getInTimezone(cal.UTC()));
-        item.setProperty("LAST-MODIFIED", cal.fromRFC3339(aEntry.updated, calendarZone).getInTimezone(cal.UTC()));
+        item.setProperty("DTSTAMP", cal.fromRFC3339(aEntry.updated, calendarZone).getInTimezone(cal.dtz.UTC));
+        item.setProperty("LAST-MODIFIED", cal.fromRFC3339(aEntry.updated, calendarZone).getInTimezone(cal.dtz.UTC));
     } catch (e) {
         cal.ERROR("[calGoogleCalendar] Error parsing JSON tasks stream: " + stringException(e));
         throw e;
     }
 
     return item;
 }
 
--- a/calendar/providers/memory/calMemoryCalendar.js
+++ b/calendar/providers/memory/calMemoryCalendar.js
@@ -412,18 +412,18 @@ calMemoryCalendar.prototype = {
         } else if (wantEvents && wantTodos) {
             typeIID = Components.interfaces.calIItemBase;
         } else if (wantEvents) {
             typeIID = Components.interfaces.calIEvent;
         } else if (wantTodos) {
             typeIID = Components.interfaces.calITodo;
         }
 
-        aRangeStart = cal.ensureDateTime(aRangeStart);
-        aRangeEnd = cal.ensureDateTime(aRangeEnd);
+        aRangeStart = cal.dtz.ensureDateTime(aRangeStart);
+        aRangeEnd = cal.dtz.ensureDateTime(aRangeEnd);
 
         let requestedFlag = 0;
         if ((aItemFilter & calICalendar.ITEM_FILTER_OFFLINE_CREATED) != 0) {
             requestedFlag = cICL.OFFLINE_FLAG_CREATED_RECORD;
         } else if ((aItemFilter & calICalendar.ITEM_FILTER_OFFLINE_MODIFIED) != 0) {
             requestedFlag = cICL.OFFLINE_FLAG_MODIFIED_RECORD;
         } else if ((aItemFilter & calICalendar.ITEM_FILTER_OFFLINE_DELETED) != 0) {
             requestedFlag = cICL.OFFLINE_FLAG_DELETED_RECORD;
--- a/calendar/providers/storage/calStorageHelpers.jsm
+++ b/calendar/providers/storage/calStorageHelpers.jsm
@@ -44,17 +44,17 @@ var gForeignTimezonesCache = {};
  * @param date      The calIDateTime to convert.
  * @return          The possibly converted calIDateTime.
  */
 function getInUtcOrKeepFloating(date) {
     let timezone = date.timezone;
     if (timezone.isFloating || timezone.isUTC) {
         return date;
     } else {
-        return date.getInTimezone(cal.UTC());
+        return date.getInTimezone(cal.dtz.UTC);
     }
 }
 
 /**
  * Transforms a date object to a text which is suitable for the database
  *
  * @param date  The calIDateTime to transform.
  * @return      The string representation of the date object.
@@ -184,12 +184,12 @@ function newDateTime(aNativeTime, aTimez
     if (aTimezone) {
         let timezone = getTimezone(aTimezone);
         if (timezone) {
             date = date.getInTimezone(timezone);
         } else {
             cal.ASSERT(false, "Timezone not available: " + aTimezone);
         }
     } else {
-        date.timezone = cal.floating();
+        date.timezone = cal.dtz.floating;
     }
     return date;
 }
--- a/calendar/providers/storage/calStorageUpgrade.jsm
+++ b/calendar/providers/storage/calStorageUpgrade.jsm
@@ -1122,17 +1122,17 @@ upgrade.v16 = function(db, version) {
                         if (aTzId == "floating") {
                             // The current calDateTime code assumes that if a
                             // date is floating then we can just assign the new
                             // timezone. I have the feeling this is wrong so I
                             // filed bug 520463. Since we want to release 1.0b1
                             // soon, I will just fix this on the "client side"
                             // and do the conversion here.
                             alarmDate.timezone = cal.getTimezoneService().defaultTimezone;
-                            alarmDate = alarmDate.getInTimezone(cal.UTC());
+                            alarmDate = alarmDate.getInTimezone(cal.dtz.UTC);
                         } else {
                             alarmDate.timezone = cal.getTimezoneService().getTimezone(aTzId);
                         }
                         alarm.alarmDate = alarmDate;
                     }
                     return alarm.icalString;
                 } catch (e) {
                     // Errors in this function are not really logged. Do this
--- a/calendar/providers/wcap/calWcapCalendarItems.js
+++ b/calendar/providers/wcap/calWcapCalendarItems.js
@@ -50,19 +50,19 @@ calWcapCalendar.prototype.getRecurrenceP
                 if (isNeg) {
                     out_exrules.value.push(rule);
                 } else {
                     out_rrules.value.push(rule);
                 }
             } else if (rDateInstance) {
                 // cs does not accept DATEs here:
                 if (isNeg) {
-                    out_exdates.value.push(getIcalUTC(cal.ensureDateTime(rDateInstance.date)));
+                    out_exdates.value.push(getIcalUTC(cal.dtz.ensureDateTime(rDateInstance.date)));
                 } else {
-                    out_rdates.value.push(getIcalUTC(cal.ensureDateTime(rDateInstance.date)));
+                    out_rdates.value.push(getIcalUTC(cal.dtz.ensureDateTime(rDateInstance.date)));
                 }
             } else {
                 this.notifyError(NS_ERROR_UNEXPECTED,
                                  "don't know how to handle this recurrence item: " + rItem.valueAsIcalString);
             }
         }
     }
 };
@@ -549,17 +549,17 @@ calWcapCalendar.prototype.storeItem = fu
             params += "&storetype=1";
         } else if (oldItem) {
             params += "&storetype=2";
         } // else we don't know exactly, so don't check
 
         if (bIsParent) {
             params += "&mod=4"; // THIS AND ALL INSTANCES
         } else {
-            params += "&mod=1&rid=" + getIcalUTC(cal.ensureDateTime(item.recurrenceId)); // THIS INSTANCE
+            params += "&mod=1&rid=" + getIcalUTC(cal.dtz.ensureDateTime(item.recurrenceId)); // THIS INSTANCE
         }
 
         params += "&method=" + method;
         if (bNoSmtpNotify) {
             params += "&smtp=0&smtpNotify=0&notify=0";
         }
         params += "&replace=1"; // (update) don't append to any lists
         params += "&fetch=1&relativealarm=1&compressed=1&recurring=1";
@@ -747,17 +747,17 @@ calWcapCalendar.prototype.deleteItem = f
         if (!item.id) {
             throw new Components.Exception("no item id!");
         }
         let params = "&uid=" + encodeURIComponent(item.id);
         if (isParent(item)) { // delete THIS AND ALL:
             params += "&mod=4&rid=0";
         } else { // delete THIS INSTANCE:
             // cs does not accept DATE here:
-            params += "&mod=1&rid=" + getIcalUTC(cal.ensureDateTime(item.recurrenceId));
+            params += "&mod=1&rid=" + getIcalUTC(cal.dtz.ensureDateTime(item.recurrenceId));
         }
 
         let orgCalId = getCalId(item.organizer);
         if (!orgCalId || (orgCalId != this.calId)) {
             // item does not belong to this user, so don't notify:
             params += "&smtp=0&smtpNotify=0&notify=0";
         }
 
@@ -1118,18 +1118,18 @@ function getItemFilterParams(itemFilter)
     //         compstate += ";REQUEST-WAITFORREPLY";
     if (compstate.length > 0) {
         params += "&compstate=" + compstate.substr(1);
     }
     return params;
 }
 
 calWcapCalendar.prototype.getItems = function(itemFilter, maxResults, rangeStart, rangeEnd, listener) {
-    rangeStart = cal.ensureDateTime(rangeStart);
-    rangeEnd = cal.ensureDateTime(rangeEnd);
+    rangeStart = cal.dtz.ensureDateTime(rangeStart);
+    rangeEnd = cal.dtz.ensureDateTime(rangeEnd);
     let zRangeStart = getIcalUTC(rangeStart);
     let zRangeEnd = getIcalUTC(rangeEnd);
 
     let request = new calWcapRequest(
         (oprequest, err, data) => {
             log("getItems() complete: " + errorToString(err), this);
             this.notifyOperationComplete(listener,
                                          getResultCode(err),
--- a/calendar/providers/wcap/calWcapSession.js
+++ b/calendar/providers/wcap/calWcapSession.js
@@ -161,19 +161,19 @@ calWcapSession.prototype = {
             hasMore: function() {
                 return (this.m_index < tzids.length);
             }
         };
     },
     getTimezone: function(tzid) {
         switch (tzid) {
             case "floating":
-                return cal.floating();
+                return cal.dtz.floating;
             case "UTC":
-                return cal.UTC();
+                return cal.dtz.UTC;
             default:
                 if (this.m_serverTimezones) {
                     return this.m_serverTimezones[tzid];
                 }
                 return null;
         }
     },
 
@@ -920,18 +920,18 @@ calWcapSession.prototype = {
         } catch (exc) {
             request.execRespFunc(exc);
         }
         return request;
     },
 
     // calIFreeBusyProvider:
     getFreeBusyIntervals: function(calId, rangeStart, rangeEnd, busyTypes, listener) {
-        rangeStart = cal.ensureDateTime(rangeStart);
-        rangeEnd = cal.ensureDateTime(rangeEnd);
+        rangeStart = cal.dtz.ensureDateTime(rangeStart);
+        rangeEnd = cal.dtz.ensureDateTime(rangeEnd);
         let zRangeStart = getIcalUTC(rangeStart);
         let zRangeEnd = getIcalUTC(rangeEnd);
 
         let request = new calWcapRequest(
             (oprequest, err, data) => {
                 let rc = getResultCode(err);
                 switch (rc) {
                     case calIWcapErrors.WCAP_NO_ERRNO: // workaround
--- a/calendar/providers/wcap/calWcapUtils.js
+++ b/calendar/providers/wcap/calWcapUtils.js
@@ -9,17 +9,17 @@
 Components.utils.import("resource://calendar/modules/calIteratorUtils.jsm");
 Components.utils.import("resource://calendar/modules/calUtils.jsm");
 Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://gre/modules/Preferences.jsm");
 
 var g_bShutdown = false;
 
 function initLogging() {
-    initLogging.mLogTimezone = cal.calendarDefaultTimezone();
+    initLogging.mLogTimezone = cal.dtz.defaultTimezone;
     if (initLogging.mLogFilestream) {
         try {
             initLogging.mLogFilestream.close();
         } catch (exc) {
             cal.ASSERT(false, exc);
         }
         initLogging.mLogFilestream = null;
     }
@@ -175,28 +175,28 @@ function filterXmlNodes(name, rootNode) 
     }
     return ret;
 }
 
 function getTime() {
     if (g_bShutdown) {
         return null;
     }
-    return cal.jsDateToDateTime(new Date());
+    return cal.dtz.jsDateToDateTime(new Date());
 }
 
 function getIcalUTC(date) {
     if (!date || !date.isValid) {
         return "0";
     } else {
         let dtz = date.timezone;
         if (dtz.isUTC || dtz.isFloating) {
             return date.icalString;
         } else {
-            return date.getInTimezone(cal.UTC()).icalString;
+            return date.getInTimezone(cal.dtz.UTC).icalString;
         }
     }
 }
 
 function getDatetimeFromIcalString(val) {
     if (!val || val.length == 0 || val == "0") {
         return null;
     }
--- a/calendar/resources/content/datetimepickers/datetimepickers.xml
+++ b/calendar/resources/content/datetimepickers/datetimepickers.xml
@@ -155,23 +155,23 @@
             // corresponding to the nearest day in the future that is
             // that day of the week
             function getDateForDay(aWord) {
                 for (let i in self.mDayNames) {
                     if (aWord != self.mDayNames[i]) {
                         continue;
                     }
                     // Figure out what day of the week today is.
-                    let today = cal.now();
+                    let today = cal.dtz.now();
 
                     // i-weekday gets the offset. Add 7 to ensure that the %
                     // operation stays positive.
                     let offset = (i - today.weekday + 7) % 7;
                     today.day = today.day + offset;
-                    return cal.dateTimeToJsDate(today);
+                    return cal.dtz.dateTimeToJsDate(today);
                 }
                 return null;
             }
 
             // Remove commas
             val = val.replace(",", "");
 
             if (!val.includes(" ")) {
@@ -1864,17 +1864,17 @@
             this.amRegExp = new RegExp("^(?:" + amExpr + ")$");
             this.pmRegExp = new RegExp("^(?:" + pmExpr + ")$");
         ]]></body>
       </method>
 
       <method name="formatDate">
         <parameter name="aDate"/>
         <body><![CDATA[
-            return cal.getDateFormatter().formatDateShort(cal.jsDateToDateTime(aDate, cal.floating()));
+            return cal.getDateFormatter().formatDateShort(cal.dtz.jsDateToDateTime(aDate, cal.dtz.floating));
         ]]></body>
       </method>
 
       <method name="formatTime">
         <parameter name="aValue"/>
         <body><![CDATA[
             let formatter = new Services.intl.DateTimeFormat(undefined, this.kTimeFormatObject);
             return formatter.format(aValue);
--- a/calendar/resources/content/mouseoverPreviews.js
+++ b/calendar/resources/content/mouseoverPreviews.js
@@ -317,17 +317,17 @@ function boxAppendBody(box, textString, 
  * PRIVATE: Use dateFormatter to format date and time,
  * and to header grid append a row containing localized Label: date.
  *
  * @param {Node}         box            The node to add the date label to
  * @param {String}       labelProperty  The label
  * @param {calIDateTime} date           The datetime object to format and add
  */
 function boxAppendLabeledDateTime(box, labelProperty, date) {
-    date = date.getInTimezone(cal.calendarDefaultTimezone());
+    date = date.getInTimezone(cal.dtz.defaultTimezone);
     let formattedDateTime = cal.getDateFormatter().formatDateTime(date);
     boxAppendLabeledText(box, labelProperty, formattedDateTime);
 }
 
 /**
  * PRIVATE: Use dateFormatter to format date and time interval,
  * and to header grid append a row containing localized Label: interval.
  *
@@ -426,17 +426,17 @@ function getCurrentNextOrPreviousRecurre
         return calendarEvent;
     }
 
     let dur = calendarEvent.duration.clone();
     dur.isNegative = true;
 
     // To find current event when now is during event, look for occurrence
     // starting duration ago.
-    let probeTime = cal.now();
+    let probeTime = cal.dtz.now();
     probeTime.addDuration(dur);
 
     let occ = calendarEvent.recurrenceInfo.getNextOccurrence(probeTime);
 
     if (!occ) {
         let occs = calendarEvent.recurrenceInfo.getOccurrences(calendarEvent.startDate, probeTime, 0, {});
         occ = occs[occs.length - 1];
     }
--- a/calendar/test/mozmill/cal-recurrence/testWeeklyUntilRecurrence.js
+++ b/calendar/test/mozmill/cal-recurrence/testWeeklyUntilRecurrence.js
@@ -167,17 +167,17 @@ function setRecurrence(recurrence) {
 
     // delete previous date
     let untilInput = reclookup(REC_DLG_UNTIL_INPUT);
     recurrence.keypress(untilInput, "a", { accelKey: true });
     recurrence.keypress(untilInput, "VK_DELETE", {});
 
     let dateFormatter = cal.getDateFormatter();
 
-    let endDateString = dateFormatter.formatDateShort(cal.jsDateToDateTime(ENDDATE, cal.floating()));
+    let endDateString = dateFormatter.formatDateShort(cal.dtz.jsDateToDateTime(ENDDATE, cal.dtz.floating));
     recsleep(SHORT_SLEEP);
     recurrence.type(untilInput, endDateString);
 
     recsleep(SHORT_SLEEP);
     // Move focus to ensure the date is selected
     recurrence.keypress(untilInput, "VK_TAB", {});
 
     // close dialog
--- a/calendar/test/mozmill/recurrenceRotated/testWeeklyUntilRecurrence.js
+++ b/calendar/test/mozmill/recurrenceRotated/testWeeklyUntilRecurrence.js
@@ -178,17 +178,17 @@ function setRecurrence(recurrence) {
     `;
 
     // delete previous date
     recurrence.keypress(reclookup(input), "a", { ctrlKey: true });
     recurrence.keypress(reclookup(input), "VK_DELETE", {});
 
     let dateFormatter = cal.getDateFormatter();
 
-    let endDateString = dateFormatter.formatDateShort(cal.jsDateToDateTime(ENDDATE, cal.floating()));
+    let endDateString = dateFormatter.formatDateShort(cal.dtz.jsDateToDateTime(ENDDATE, cal.dtz.floating));
 
     recurrence.type(reclookup(input), endDateString);
 
     // close dialog
     recurrence.click(reclookup(`
         /id("calendar-event-dialog-recurrence")/anon({"anonid":"buttons"})/
         {"dlgtype":"accept"}
     `));
--- a/calendar/test/mozmill/recurrenceRotated/testWeeklyWithExceptionRecurrence.js
+++ b/calendar/test/mozmill/recurrenceRotated/testWeeklyWithExceptionRecurrence.js
@@ -85,17 +85,17 @@ function testWeeklyWithExceptionRecurren
             anon({"class":"menulist-editable-box textbox-input-box"})/
             anon({"anonid":"input"})
         `);
 
         event.keypress(startDateInput, "a", { ctrlKey: true });
 
         let dateFormatter = cal.getDateFormatter();
 
-        let startDateString = dateFormatter.formatDateShort(cal.jsDateToDateTime(STARTDATE, cal.floating()));
+        let startDateString = dateFormatter.formatDateShort(cal.dtz.jsDateToDateTime(STARTDATE, cal.dtz.floating));
         event.type(startDateInput, startDateString);
         // applies startdate change
         event.click(endDateInput);
 
         event.click(eventid("button-saveandclose"));
     });
 
     // change recurrence rule
--- a/calendar/test/mozmill/shared-modules/test-calendar-utils.js
+++ b/calendar/test/mozmill/shared-modules/test-calendar-utils.js
@@ -711,45 +711,45 @@ function setData(dialog, iframe, data) {
     if (data.timezone != undefined) {
         let menuitem = iframeId("options-timezones-menuitem");
         menuitem.getNode().setAttribute("checked", data.timezone);
         dialog.click(menuitem);
     }
 
     // startdate
     if (data.startdate != undefined && data.startdate.constructor.name == "Date") {
-        let startdate = dateFormatter.formatDateShort(cal.jsDateToDateTime(data.startdate, cal.floating()));
+        let startdate = dateFormatter.formatDateShort(cal.dtz.jsDateToDateTime(data.startdate, cal.dtz.floating));
 
         if (!isEvent) {
             dialog.check(iframeId("todo-has-entrydate"), true);
         }
         dialog.keypress(startDateInput, "a", { accelKey: true });
         dialog.type(startDateInput, startdate);
     }
 
     // starttime
     if (data.starttime != undefined && data.starttime.constructor.name == "Date") {
-        let starttime = dateFormatter.formatTime(cal.jsDateToDateTime(data.starttime, cal.floating()));
+        let starttime = dateFormatter.formatTime(cal.dtz.jsDateToDateTime(data.starttime, cal.dtz.floating));
         startTimeInput.getNode().value = starttime;
         sleep();
     }
 
     // enddate
     if (data.enddate != undefined && data.enddate.constructor.name == "Date") {
-        let enddate = dateFormatter.formatDateShort(cal.jsDateToDateTime(data.enddate, cal.floating()));
+        let enddate = dateFormatter.formatDateShort(cal.dtz.jsDateToDateTime(data.enddate, cal.dtz.floating));
         if (!isEvent) {
             dialog.check(iframeId("todo-has-duedate"), true);
         }
         dialog.keypress(endDateInput, "a", { accelKey: true });
         dialog.type(endDateInput, enddate);
     }
 
     // endtime
     if (data.endtime != undefined && data.endtime.constructor.name == "Date") {
-        let endtime = dateFormatter.formatTime(cal.jsDateToDateTime(data.endtime, cal.floating()));
+        let endtime = dateFormatter.formatTime(cal.dtz.jsDateToDateTime(data.endtime, cal.dtz.floating));
         endTimeInput.getNode().value = endtime;
     }
 
     // recurrence
     if (data.repeat != undefined) {
         menulistSelect(iframeId("item-repeat"), data.repeat, dialog);
     }
 
@@ -787,17 +787,17 @@ function setData(dialog, iframe, data) {
             menulistSelect(iframeId("todo-status"), data.status.toUpperCase(), dialog);
         }
     }
 
     let currentStatus = iframeId("todo-status").getNode().value;
 
     // completed on
     if (data.completed != undefined && data.completed.constructor.name == "Date" && !isEvent) {
-        let completeddate = dateFormatter.formatDateShort(cal.jsDateToDateTime(data.completed, cal.floating()));
+        let completeddate = dateFormatter.formatDateShort(cal.dtz.jsDateToDateTime(data.completed, cal.dtz.floating));
 
         if (currentStatus == "COMPLETED") {
             completedDateInput.getNode().value = completeddate;
         }
     }
 
     // percent complete
     if (data.percent != undefined &&
--- a/calendar/test/mozmill/testTodayPane.js
+++ b/calendar/test/mozmill/testTodayPane.js
@@ -156,41 +156,41 @@ function testTodayPane() {
         anon({"anonid":"agenda-checkbox-widget"})/anon({"class":"checkbox-check"})
     `));
     sleep();
 
     // verify events shown in today pane
     let now = new Date();
     now.setHours(startHour);
     now.setMinutes(0);
-    let dtz = cal.calendarDefaultTimezone();
-    let probeDate = cal.jsDateToDateTime(now, dtz);
+    let dtz = cal.dtz.defaultTimezone;
+    let probeDate = cal.dtz.jsDateToDateTime(now, dtz);
     let dateFormatter = cal.getDateFormatter();
     let startTime = dateFormatter.formatTime(probeDate);
     controller.assertText(lookup(`
         /id("messengerWindow")/id("tabmail-container")/id("today-pane-panel")/
         [1]/id("agenda-panel")/{"flex":"1"}/id("agenda-listbox")/[2]/
         anon({"anonid":"agenda-container-box"})/
         anon({"anonid":"agenda-description"})/[0]/
         anon({"anonid":"agenda-event-start"})/
     `), startTime + " Today's Event");
 
     let tomorrow = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1, 9, 0);
-    probeDate = cal.jsDateToDateTime(tomorrow, dtz);
+    probeDate = cal.dtz.jsDateToDateTime(tomorrow, dtz);
     startTime = dateFormatter.formatTime(probeDate);
     controller.assertText(lookup(`
         /id("messengerWindow")/id("tabmail-container")/id("today-pane-panel")/
         [1]/id("agenda-panel")/{"flex":"1"}/id("agenda-listbox")/[4]/
         anon({"anonid":"agenda-container-box"})/
         anon({"anonid":"agenda-description"})/[0]/
         anon({"anonid":"agenda-event-start"})/
     `), startTime + " Tomorrow's Event");
 
     let future = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 6, 9, 0);
-    probeDate = cal.jsDateToDateTime(future, dtz);
+    probeDate = cal.dtz.jsDateToDateTime(future, dtz);
     startTime = dateFormatter.formatDateTime(probeDate);
 
     // Future event's start time
     controller.assertText(lookup(`
         /id("messengerWindow")/id("tabmail-container")/id("today-pane-panel")/
         [1]/id("agenda-panel")/
         {"flex":"1"}/id("agenda-listbox")/[6]/anon({"anonid":"agenda-container-box"})/
         anon({"anonid":"agenda-description"})/[0]/anon({"anonid":"agenda-event-start"})
--- a/calendar/test/mozmill/views/testMonthView.js
+++ b/calendar/test/mozmill/views/testMonthView.js
@@ -110,17 +110,17 @@ function testMonthView() {
             anon({"anonid":"hbox"})/anon({"anonid":"time-picker"})/
             anon({"class":"timepicker-box-class"})/
             anon({"class":"timepicker-text-class"})/anon({"flex":"1"})/
             anon({"anonid":"input"})
         `);
         event.waitForElement(startTimeInput);
         event.assertValue(startTimeInput, startTime);
 
-        let someTime = cal.now();
+        let someTime = cal.dtz.now();
         someTime.resetTo(2009, 1, 1);
         let date = dateFormatter.formatDateShort(someDate);
         event.assertValue(eventlookup(`
             ${eventDialog}/id("event-grid-startdate-row")/
             id("event-grid-startdate-picker-box")/id("event-starttime")/
             anon({"anonid":"hbox"})/anon({"anonid":"date-picker"})/
             anon({"flex":"1","id":"hbox","class":"datepicker-box-class"})/
             {"class":"datepicker-text-class"}/
--- a/calendar/test/unit/head_consts.js
+++ b/calendar/test/unit/head_consts.js
@@ -37,17 +37,17 @@ function createDate(aYear, aMonth, aDay,
     let date = Cc["@mozilla.org/calendar/datetime;1"]
                .createInstance(Ci.calIDateTime);
     date.resetTo(aYear,
                aMonth,
                aDay,
                aHour || 0,
                aMinute || 0,
                aSecond || 0,
-               aTimezone || cal.UTC());
+               aTimezone || cal.dtz.UTC);
     date.isDate = !aHasTime;
     return date;
 }
 
 function createEventFromIcalString(icalString) {
     if (/^BEGIN:VCALENDAR/.test(icalString)) {
         let parser = Components.classes["@mozilla.org/calendar/ics-parser;1"]
                                .createInstance(Components.interfaces.calIIcsParser);
--- a/calendar/test/unit/test_alarmservice.js
+++ b/calendar/test/unit/test_alarmservice.js
@@ -161,42 +161,42 @@ function createAlarmFromDuration(aOffset
 }
 
 function createEventWithAlarm(aCalendar, aStart, aEnd, aOffset, aRRule) {
     let alarm = null;
     let item = cal.createEvent();
 
     item.id = cal.getUUID();
     item.calendar = aCalendar;
-    item.startDate = aStart || cal.now();
-    item.endDate = aEnd || cal.now();
+    item.startDate = aStart || cal.dtz.now();
+    item.endDate = aEnd || cal.dtz.now();
     if (aOffset) {
         alarm = createAlarmFromDuration(aOffset);
         item.addAlarm(alarm);
     }
     if (aRRule) {
         item.recurrenceInfo = cal.createRecurrenceInfo(item);
         item.recurrenceInfo.appendRecurrenceItem(cal.createRecurrenceRule(aRRule));
     }
     return [item, alarm];
 }
 
 function addTestItems(aCalendar) {
     let item, alarm;
 
     // alarm on an item starting more than a month in the past should not fire
-    let date = cal.now();
+    let date = cal.dtz.now();
     date.day -= 32;
     [item, alarm] = createEventWithAlarm(aCalendar, date, date, "P7D");
     item.title="addTestItems Test 1";
     alarmObserver.expectResult(aCalendar, item, alarm, EXPECT_NONE);
     aCalendar.addItem(item, null);
 
     // alarm 15 minutes ago should fire
-    date = cal.now();
+    date = cal.dtz.now();
     [item, alarm] = createEventWithAlarm(aCalendar, date, date, "-PT15M");
     item.title="addTestItems Test 2";
     alarmObserver.expectResult(aCalendar, item, alarm, EXPECT_FIRED);
     aCalendar.addItem(item, null);
 
     // alarm within 6 hours should have a timer set
     [item, alarm] = createEventWithAlarm(aCalendar, date, date, "PT1H");
     item.title="addTestItems Test 3";
@@ -221,17 +221,17 @@ function addTestItems(aCalendar) {
         alarm = createAlarmFromDuration(offset);
         item.addAlarm(alarm);
         alarmObserver.expectResult(aCalendar, item, alarm, expected);
     });
     aCalendar.addItem(item, null);
 
     // Bug 1344068 - Alarm with lastAck on exception, should take parent lastAck.
     // Alarm 15 minutes ago should fire.
-    date = cal.now();
+    date = cal.dtz.now();
     [item, alarm] = createEventWithAlarm(aCalendar, date, date, "-PT15M", "RRULE:FREQ=DAILY;COUNT=1");
     item.title="addTestItems Test 6";
 
     // Parent item is acknowledged before alarm, so it should fire.
     let lastAck = item.startDate.clone();
     lastAck.hour -= 1;
     item.alarmLastAck = lastAck;
 
@@ -242,30 +242,30 @@ function addTestItems(aCalendar) {
     item.recurrenceInfo.modifyException(occ, true);
 
     alarmObserver.expectOccurrences(aCalendar, item, alarm, [EXPECT_FIRED]);
     aCalendar.addItem(item, null);
 
 
     // daily repeating event starting almost 2 full days ago. The alarms on the first 2 occurrences
     // should fire, and a timer should be set for the next occurrence only
-    date = cal.now();
+    date = cal.dtz.now();
     date.hour -= 47;
     [item, alarm] = createEventWithAlarm(aCalendar, date, date, "-PT15M", "RRULE:FREQ=DAILY");
     item.title="addTestItems Test 7";
     alarmObserver.expectOccurrences(aCalendar, item, alarm, [
         EXPECT_FIRED, EXPECT_FIRED, EXPECT_TIMER, EXPECT_NONE, EXPECT_NONE
     ]);
     aCalendar.addItem(item, null);
 
     // monthly repeating event starting 2 months and a day ago. The alarms on the first 2 occurrences
     // should be ignored, the alarm on the next occurrence only should fire.
     // Missing recurrences of the event in particular days of the year generate exceptions to the
     // regular sequence of alarms.
-    date = cal.now();
+    date = cal.dtz.now();
     let statusAlarmSequences = {
         reg: [EXPECT_NONE, EXPECT_NONE, EXPECT_FIRED, EXPECT_NONE, EXPECT_NONE],
         excep1: [EXPECT_NONE, EXPECT_FIRED, EXPECT_NONE, EXPECT_NONE, EXPECT_NONE],
         excep2: [EXPECT_NONE, EXPECT_NONE, EXPECT_NONE, EXPECT_NONE, EXPECT_NONE]
     };
     let expected = [];
     if (date.day == 1) {
         // Exceptions for missing occurrences on months with 30 days when the event starts on 31st.
@@ -294,17 +294,17 @@ function addTestItems(aCalendar) {
     alarmObserver.expectOccurrences(aCalendar, item, alarm, expected);
     aCalendar.addItem(item, null);
 }
 
 function doModifyItemTest(aCalendar) {
     let item, alarm;
 
     // begin with item starting before the alarm date range
-    let date = cal.now();
+    let date = cal.dtz.now();
     date.day -= 32;
     [item, alarm] = createEventWithAlarm(aCalendar, date, date, "PT0S");
     aCalendar.addItem(item, null);
     alarmObserver.expectResult(aCalendar, item, alarm, EXPECT_NONE);
     alarmObserver.checkExpected("doModifyItemTest Test 1");
 
     // move event into the fired range
     let oldItem = item.clone();
@@ -340,34 +340,34 @@ function doModifyItemTest(aCalendar) {
     item.startDate = date.clone();
     item.generation++;
     aCalendar.modifyItem(item, oldItem, null);
     alarmObserver.expectResult(aCalendar, item, alarm, EXPECT_TIMER);
     alarmObserver.checkExpected("doModifyItemTest Test 5");
     let oldTimer = alarmObserver.getTimer(aCalendar.id, item.hashId, alarm.icalString);
     oldItem = item.clone();
     // change the timezone to floating
-    item.startDate.timezone = cal.floating();
+    item.startDate.timezone = cal.dtz.floating;
     item.generation++;
     aCalendar.modifyItem(item, oldItem, null);
     // the alarm must still be timer and with the same value (apart from milliseconds)
     alarmObserver.expectResult(aCalendar, item, alarm, EXPECT_TIMER);
     alarmObserver.checkExpected("doModifyItemTest Test 5, floating timezone");
     let newTimer = alarmObserver.getTimer(aCalendar.id, item.hashId, alarm.icalString);
     ok((newTimer.delay - oldTimer.delay) <= 1000,
        "doModifyItemTest Test 5, floating timezone; check timer value");
 }
 
 function doDeleteItemTest(aCalendar) {
     alarmObserver.clear();
     let item, alarm;
     let item2, alarm2;
 
     // create a fired alarm and a timer
-    let date = cal.now();
+    let date = cal.dtz.now();
     [item, alarm] = createEventWithAlarm(aCalendar, date, date, "-PT5M");
     [item2, alarm2] = createEventWithAlarm(aCalendar, date, date, "PT1H");
     item.title="doDeleteItemTest item Test 1";
     item2.title="doDeleteItemTest item2 Test 1";
     aCalendar.addItem(item, null);
     aCalendar.addItem(item2, null);
     alarmObserver.expectResult(aCalendar, item, alarm, EXPECT_FIRED);
     alarmObserver.expectResult(aCalendar, item2, alarm2, EXPECT_TIMER);
@@ -382,17 +382,17 @@ function doDeleteItemTest(aCalendar) {
 }
 
 function doAcknowledgeTest(aCalendar) {
     alarmObserver.clear();
     let item, alarm;
     let item2, alarm2;
 
     // create the fired alarms
-    let date = cal.now();
+    let date = cal.dtz.now();
     [item, alarm] = createEventWithAlarm(aCalendar, date, date, "-PT5M");
     [item2, alarm2] = createEventWithAlarm(aCalendar, date, date, "-PT5M");
     item.title="doAcknowledgeTest item Test 1";
     item2.title="doAcknowledgeTest item2 Test 1";
     aCalendar.addItem(item, null);
     aCalendar.addItem(item2, null);
     alarmObserver.expectResult(aCalendar, item, alarm, EXPECT_FIRED);
     alarmObserver.expectResult(aCalendar, item2, alarm2, EXPECT_FIRED);
--- a/calendar/test/unit/test_alarmutils.js
+++ b/calendar/test/unit/test_alarmutils.js
@@ -61,19 +61,19 @@ add_task(function* test_setDefaultValues
 
     Preferences.reset("calendar.alarms.onforevents");
     Preferences.reset("calendar.alarms.eventalarmunit");
     Preferences.reset("calendar.alarms.eventalarmlen");
 });
 
 add_task(function* test_setDefaultValues_tasks() {
     let item, alarm;
-    let calnow = cal.now;
+    let calnow = cal.dtz.now;
     let nowDate = cal.createDateTime("20150815T120000");
-    cal.now = function() {
+    cal.dtz.now = function() {
         return nowDate;
     };
 
     Preferences.set("calendar.alarms.onfortodos", 1);
     Preferences.set("calendar.alarms.todoalarmunit", "hours");
     Preferences.set("calendar.alarms.todoalarmlen", 60);
     item = cal.createTodo();
     equal(item.entryDate, null);
@@ -117,17 +117,17 @@ add_task(function* test_setDefaultValues
     ok(alarm);
     equal(alarm.related, alarm.ALARM_RELATED_START);
     equal(alarm.action, "SHOUT");
     equal(alarm.offset.icalString, "-P2DT12H");
 
     Preferences.reset("calendar.alarms.onfortodos");
     Preferences.reset("calendar.alarms.todoalarmunit");
     Preferences.reset("calendar.alarms.todoalarmlen");
-    cal.now = calnow;
+    cal.dtz.now = calnow;
 });
 
 add_task(function* test_calculateAlarmDate() {
     let item = cal.createEvent();
     item.startDate = cal.createDateTime("20150815T120000");
     item.endDate = cal.createDateTime("20150815T130000");
 
     let calculateAlarmDate = cal.alarms.calculateAlarmDate.bind(cal.alarms, item);
--- a/calendar/test/unit/test_bug272411.js
+++ b/calendar/test/unit/test_bug272411.js
@@ -1,15 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 function run_test() {
     let jsd = new Date();
-    let cdt = cal.jsDateToDateTime(jsd);
+    let cdt = cal.dtz.jsDateToDateTime(jsd);
 
-    let cdtTime = cal.dateTimeToJsDate(cdt).getTime() / 1000;
+    let cdtTime = cal.dtz.dateTimeToJsDate(cdt).getTime() / 1000;
     let jsdTime = Math.floor(jsd.getTime() / 1000);
 
     // calIDateTime is only accurate to the second, milliseconds need to be
     // stripped.
     equal(cdtTime, jsdTime);
 }
--- a/calendar/test/unit/test_calmgr.js
+++ b/calendar/test/unit/test_calmgr.js
@@ -148,18 +148,18 @@ add_test(function test_calobserver() {
     calmgr.registerCalendar(memory);
     calmgr.registerCalendar(memory2);
     calmgr.addCalendarObserver(allobs);
     memory.addObserver(calobs);
 
     // Add an item
     let item = cal.createEvent();
     item.id = cal.getUUID();
-    item.startDate = cal.now();
-    item.endDate = cal.now();
+    item.startDate = cal.dtz.now();
+    item.endDate = cal.dtz.now();
     memory.addItem(item, null);
     checkCounters(1, 0, 0);
 
     // Modify the item
     let newItem = item.clone();
     newItem.title = "title";
     memory.modifyItem(newItem, item, null);
     checkCounters(0, 1, 0);
--- a/calendar/test/unit/test_datetime.js
+++ b/calendar/test/unit/test_datetime.js
@@ -14,21 +14,21 @@ function really_run_test() {
     let date = cal.createDateTime();
     date.resetTo(2005, 10, 13,
                  10, 0, 0,
                  getMozTimezone("/mozilla.org/20050126_1/America/Bogota"));
 
     equal(date.hour, 10);
     equal(date.icalString, "20051113T100000");
 
-    let date_floating = date.getInTimezone(cal.floating());
+    let date_floating = date.getInTimezone(cal.dtz.floating);
     equal(date_floating.hour, 10);
 
 
-    let date_utc = date.getInTimezone(cal.UTC());
+    let date_utc = date.getInTimezone(cal.dtz.UTC);
     equal(date_utc.hour, 15);
     equal(date_utc.icalString, "20051113T150000Z");
 
     date.hour = 25;
     equal(date.hour, 1);
     equal(date.day, 14);
 
 
@@ -53,17 +53,17 @@ function really_run_test() {
 
     // Bug 398724 - Problems with floating all-day items
     let event = cal.createEvent("BEGIN:VEVENT\nUID:45674d53-229f-48c6-9f3b-f2b601e7ae4d\nSUMMARY:New Event\nDTSTART;VALUE=DATE:20071003\nDTEND;VALUE=DATE:20071004\nEND:VEVENT");
     ok(event.startDate.timezone.isFloating);
     ok(event.endDate.timezone.isFloating);
 
     // Bug 392853 - Same times, different timezones, but subtractDate says times are PT0S apart
     const zeroLength = cal.createDuration();
-    const a = cal.jsDateToDateTime(new Date());
+    const a = cal.dtz.jsDateToDateTime(new Date());
     a.timezone = getMozTimezone("/mozilla.org/20071231_1/Europe/Berlin");
 
     let b = a.clone();
     b.timezone = getMozTimezone("/mozilla.org/20071231_1/America/New_York");
 
     let duration = a.subtractDate(b);
     notEqual(duration.compare(zeroLength), 0);
     notEqual(a.compare(b), 0);
@@ -85,16 +85,16 @@ function really_run_test() {
     // A newly created date should be in UTC, as should its clone
     let utc = cal.createDateTime();
     equal(utc.timezone.tzid, "UTC");
     equal(utc.clone().timezone.tzid, "UTC");
     equal(utc.timezoneOffset, 0);
 
     // Bug 794477 - setting jsdate across compartments needs to work
     let someDate = new Date();
-    let createdDate = cal.jsDateToDateTime(someDate).getInTimezone(cal.calendarDefaultTimezone());
+    let createdDate = cal.dtz.jsDateToDateTime(someDate).getInTimezone(cal.dtz.defaultTimezone);
     someDate.setMilliseconds(0);
-    equal(someDate.getTime(), cal.dateTimeToJsDate(createdDate).getTime());
+    equal(someDate.getTime(), cal.dtz.dateTimeToJsDate(createdDate).getTime());
 
     // Comparing a date-time with a date of the same day should be 0
     equal(cal.createDateTime("20120101T120000").compare(cal.createDateTime("20120101")), 0);
     equal(cal.createDateTime("20120101").compare(cal.createDateTime("20120101T120000")), 0);
 }
--- a/calendar/test/unit/test_datetime_before_1970.js
+++ b/calendar/test/unit/test_datetime_before_1970.js
@@ -5,17 +5,17 @@
 function run_test() {
     // Bug 769938 - dates before 1970 are not handled correctly
     // due to signed vs. unsigned mismatch in PRTime in xpconnect
 
     let dateTime1950 = cal.createDateTime();
     dateTime1950.year = 1950;
     equal(dateTime1950.year, 1950);
 
-    let dateTime1955 = cal.jsDateToDateTime(new Date(1955, 6, 15));
+    let dateTime1955 = cal.dtz.jsDateToDateTime(new Date(1955, 6, 15));
     equal(dateTime1955.year, 1955);
 
     let dateTime1965 = cal.createDateTime();
     dateTime1965.nativeTime = -150000000000000;
     equal(dateTime1965.year, 1965);
     equal(dateTime1965.nativeTime, -150000000000000);
 
     let dateTime1990 = cal.createDateTime();
--- a/calendar/test/unit/test_datetimeformatter.js
+++ b/calendar/test/unit/test_datetimeformatter.js
@@ -38,17 +38,17 @@ add_task(function* formatDate_test() {
 
 
     let tzs = cal.getTimezoneService();
 
     let i = 0;
     for (let test of data) {
         i++;
         Preferences.set("calendar.date.format", test.input.dateformat);
-        let zone = (test.input.timezone == "floating") ? cal.floating() : tzs.getTimezone(test.input.timezone);
+        let zone = (test.input.timezone == "floating") ? cal.dtz.floating : tzs.getTimezone(test.input.timezone);
         let date = cal.createDateTime(test.input.datetime).getInTimezone(zone);
 
         let dtFormatter = Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
                                     .getService(Components.interfaces.calIDateTimeFormatter);
         let formatted = dtFormatter.formatDate(date);
         ok(
             test.expected.includes(formatted),
             "(test #" + i + ": result '" + formatted + "', expected '" + test.expected + "')"
@@ -117,17 +117,17 @@ add_task(function* formatDateShort_test(
     Preferences.set("calendar.date.format", 0);
 
     let tzs = cal.getTimezoneService();
 
     let i = 0;
     for (let test of data) {
         i++;
 
-        let zone = (test.input.timezone == "floating") ? cal.floating() : tzs.getTimezone(test.input.timezone);
+        let zone = (test.input.timezone == "floating") ? cal.dtz.floating : tzs.getTimezone(test.input.timezone);
         let date = cal.createDateTime(test.input.datetime).getInTimezone(zone);
 
         let dtFormatter = Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
                                     .getService(Components.interfaces.calIDateTimeFormatter);
 
         let formatted = dtFormatter.formatDateShort(date);
         ok(
             test.expected.includes(formatted),
@@ -197,17 +197,17 @@ add_task(function* formatDateLong_test()
     Preferences.set("calendar.date.format", 1);
 
     let tzs = cal.getTimezoneService();
 
     let i = 0;
     for (let test of data) {
         i++;
 
-        let zone = (test.input.timezone == "floating") ? cal.floating() : tzs.getTimezone(test.input.timezone);
+        let zone = (test.input.timezone == "floating") ? cal.dtz.floating : tzs.getTimezone(test.input.timezone);
         let date = cal.createDateTime(test.input.datetime).getInTimezone(zone);
 
         let dtFormatter = Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
                                     .getService(Components.interfaces.calIDateTimeFormatter);
 
         let formatted = dtFormatter.formatDateLong(date);
         ok(
             test.expected.includes(formatted),
@@ -277,17 +277,17 @@ add_task(function* formatDateWithoutYear
     Preferences.set("calendar.date.format", 1);
 
     let tzs = cal.getTimezoneService();
 
     let i = 0;
     for (let test of data) {
         i++;
 
-        let zone = (test.input.timezone == "floating") ? cal.floating() : tzs.getTimezone(test.input.timezone);
+        let zone = (test.input.timezone == "floating") ? cal.dtz.floating : tzs.getTimezone(test.input.timezone);
         let date = cal.createDateTime(test.input.datetime).getInTimezone(zone);
 
         let dtFormatter = Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
                                     .getService(Components.interfaces.calIDateTimeFormatter);
 
         equal(dtFormatter.formatDateWithoutYear(date), test.expected, "(test #" + i + ")");
     }
     // let's reset the preferences
@@ -332,17 +332,17 @@ add_task(function* formatTime_test() {
     Preferences.set("calendar.timezone.local", "Pacific/Fakaofo");
 
     let tzs = cal.getTimezoneService();
 
     let i = 0;
     for (let test of data) {
         i++;
 
-        let zone = (test.input.timezone == "floating") ? cal.floating() : tzs.getTimezone(test.input.timezone);
+        let zone = (test.input.timezone == "floating") ? cal.dtz.floating : tzs.getTimezone(test.input.timezone);
         let date = cal.createDateTime(test.input.datetime).getInTimezone(zone);
 
         let dtFormatter = Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
                                     .getService(Components.interfaces.calIDateTimeFormatter);
 
         let formatted = dtFormatter.formatTime(date);
         ok(
             test.expected.includes(formatted),
--- a/calendar/test/unit/test_deleted_items.js
+++ b/calendar/test/unit/test_deleted_items.js
@@ -34,30 +34,30 @@ add_task(function* test_deleted_items() 
     // error.
     yield check_delmgr_call(() => delmgr.flush());
 
     let memory = calmgr.createCalendar("memory", Services.io.newURI("moz-storage-calendar://"));
     calmgr.registerCalendar(memory);
 
     let item = cal.createEvent();
     item.id = "test-item-1";
-    item.startDate = cal.now();
-    item.endDate = cal.now();
+    item.startDate = cal.dtz.now();
+    item.endDate = cal.dtz.now();
 
     // Add the item, it still shouldn't be in the deleted database.
     yield check_delmgr_call(() => memory.addItem(item, null));
     equal(delmgr.getDeletedDate(item.id), null);
     equal(delmgr.getDeletedDate(item.id, memory.id), null);
 
     // We need to stop time so we have something to compare with.
-    let referenceDate = cal.createDateTime("20120726T112045"); referenceDate.timezone = cal.calendarDefaultTimezone();
-    let futureDate = cal.createDateTime("20380101T000000"); futureDate.timezone = cal.calendarDefaultTimezone();
+    let referenceDate = cal.createDateTime("20120726T112045"); referenceDate.timezone = cal.dtz.defaultTimezone;
+    let futureDate = cal.createDateTime("20380101T000000"); futureDate.timezone = cal.dtz.defaultTimezone;
     let useFutureDate = false;
-    let oldNowFunction = cal.now;
-    cal.now = function() {
+    let oldNowFunction = cal.dtz.now;
+    cal.dtz.now = function() {
         return (useFutureDate ? futureDate : referenceDate).clone();
     };
 
     // Deleting an item should trigger it being marked for deletion.
     yield check_delmgr_call(() => memory.deleteItem(item, null));
 
     // Now check if it was deleted at our reference date.
     let deltime = delmgr.getDeletedDate(item.id);
@@ -85,10 +85,10 @@ add_task(function* test_deleted_items() 
     yield check_delmgr_call(() => memory.addItem(item, null));
     equal(delmgr.getDeletedDate(item.id), null);
     yield check_delmgr_call(() => memory.deleteItem(item, null));
     equal(delmgr.getDeletedDate(item.id).compare(referenceDate), 0);
     yield check_delmgr_call(() => memory.addItem(item, null));
     equal(delmgr.getDeletedDate(item.id), null);
 
     // Revert now function, in case more tests are written.
-    cal.now = oldNowFunction;
+    cal.dtz.now = oldNowFunction;
 });
--- a/calendar/test/unit/test_gdata_provider.js
+++ b/calendar/test/unit/test_gdata_provider.js
@@ -393,35 +393,35 @@ GDataServer.prototype = {
         jsonData.kind = "calendar#event";
         jsonData.etag = this.nextEtag || '"' + (new Date()).getTime() + '"';
         jsonData.id = generateID();
         if (!isImport) { jsonData.htmlLink = this.baseUri + "/calendar/event?eid=" + jsonData.id; }
         if (!isImport || !jsonData.iCalUID) {
             jsonData.iCalUID = jsonData.id + "@google.com";
         }
         if (!isImport || !jsonData.created) {
-            jsonData.created = cal.toRFC3339(cal.now());
+            jsonData.created = cal.toRFC3339(cal.dtz.now());
         }
         if (!isImport || !jsonData.updated) {
-            jsonData.updated = cal.toRFC3339(cal.now());
+            jsonData.updated = cal.toRFC3339(cal.dtz.now());
         }
         if (!isImport || !jsonData.creator) {
             jsonData.creator = this.creator;
         }
         if (!isImport || !jsonData.organizer) {
             jsonData.organizer = this.creator;
         }
         this.nextEtag = null;
         return jsonData;
     },
 
     processModifyEvent: function(jsonData, id) {
         jsonData.kind = "calendar#event";
         jsonData.etag = this.nextEtag || '"' + (new Date()).getTime() + '"';
-        jsonData.updated = cal.toRFC3339(cal.now());
+        jsonData.updated = cal.toRFC3339(cal.dtz.now());
         jsonData.id = id;
         jsonData.iCalUID = (jsonData.recurringEventId || jsonData.id) + "@google.com";
         if (!jsonData.creator) {
             jsonData.creator = this.creator;
         }
         if (!jsonData.organizer) {
             jsonData.organizer = this.creator;
         }
@@ -434,32 +434,32 @@ GDataServer.prototype = {
         jsonData.kind = "tasks#task";
         jsonData.etag = this.nextEtag || '"' + (new Date()).getTime() + '"';
         jsonData.id = generateID();
         jsonData.position = generateID(); // Not a real position, but we don't really use this at the moment
         if (!jsonData.status) {
             jsonData.status = "needsAction";
         }
         if (!jsonData.updated) {
-            jsonData.updated = cal.toRFC3339(cal.now());
+            jsonData.updated = cal.toRFC3339(cal.dtz.now());
         }
 
         this.nextEtag = null;
         return jsonData;
     },
 
     processModifyTask: function(jsonData) {
         jsonData.kind = "tasks#task";
         jsonData.etag = this.nextEtag || '"' + (new Date()).getTime() + '"';
-        jsonData.updated = cal.toRFC3339(cal.now());
+        jsonData.updated = cal.toRFC3339(cal.dtz.now());
         if (!jsonData.status) {
             jsonData.status = "needsAction";
         }
         if (!jsonData.updated) {
-            jsonData.updated = cal.toRFC3339(cal.now());
+            jsonData.updated = cal.toRFC3339(cal.dtz.now());
         }
 
         this.nextEtag = null;
         return jsonData;
     },
 };
 
 function findKey(container, key, searchKey) {
@@ -608,17 +608,17 @@ add_task(function* test_dateToJSON() {
         parser.parseString(ics);
         let items = parser.getItems({});
         return items[0].startDate;
     }
 
     let date;
 
     // no timezone
-    date = _createDateTime(cal.floating());
+    date = _createDateTime(cal.dtz.floating);
     deepEqual(dateToJSON(date), { dateTime: "2015-01-30T12:00:00-00:00" });
 
     // valid non-Olson tz name
     date = _createDateTime("Eastern Standard Time");
     deepEqual(dateToJSON(date), { dateTime: "2015-01-30T12:00:00", timeZone: "America/New_York" });
 
     // valid continent/city Olson tz
     date = _createDateTime("America/New_York");
--- a/calendar/test/unit/test_items.js
+++ b/calendar/test/unit/test_items.js
@@ -203,17 +203,17 @@ function test_immutable() {
     alarm.offset = cal.createDuration("PT1S");
     event.addAlarm(alarm);
 
     event.setProperty("X-NAME", "X-VALUE");
     event.setPropertyParameter("X-NAME", "X-PARAM", "X-PARAMVAL");
 
     event.setCategories(3, ["a", "b", "c"]);
 
-    equal(event.alarmLastAck.timezone.tzid, cal.UTC().tzid);
+    equal(event.alarmLastAck.timezone.tzid, cal.dtz.UTC.tzid);
 
     event.makeImmutable();
 
     // call again, should not throw
     event.makeImmutable();
 
     ok(!event.alarmLastAck.isMutable);
     ok(!org.isMutable);
--- a/calendar/test/unit/test_recur.js
+++ b/calendar/test/unit/test_recur.js
@@ -705,22 +705,22 @@ function test_rrule_interface() {
 
     // untilDate (without UTC)
     rrule.count = 3;
     let untilDate = cal.createDateTime();
     untilDate.timezone = cal.getTimezoneService().getTimezone("Europe/Berlin");
     rrule.untilDate = untilDate;
     ok(!rrule.isByCount);
     throws(() => rrule.count, /0x80004005/);
-    equal(rrule.untilDate.icalString, untilDate.getInTimezone(cal.UTC()).icalString);
+    equal(rrule.untilDate.icalString, untilDate.getInTimezone(cal.dtz.UTC).icalString);
 
     // untilDate (with UTC)
     rrule.count = 3;
     untilDate = cal.createDateTime();
-    untilDate.timezone = cal.UTC();
+    untilDate.timezone = cal.dtz.UTC;
     rrule.untilDate = untilDate;
     ok(!rrule.isByCount);
     throws(() => rrule.count, /0x80004005/);
     equal(rrule.untilDate.icalString, untilDate.icalString);
 }
 
 function test_startdate_change() {
     // Setting a start date if its missing shouldn't throw
--- a/calendar/test/unit/test_rfc3339_parser.js
+++ b/calendar/test/unit/test_rfc3339_parser.js
@@ -62,17 +62,17 @@ function really_run_test() {
      *
      * All tests are done under the default timezone and UTC (although both
      * should give the same time).
      */
 
     // An arbitrary timezone (that has daylight savings time).
     let getTz = (aTz) => cal.getTimezoneService().getTimezone(aTz);
     let timezone = getTz("America/New_York");
-    let utc = cal.UTC();
+    let utc = cal.dtz.UTC;
     // Timezones used in tests.
     let belize = getTz("America/Belize");
     let dawson = getTz("America/Dawson");
 
     /*
      * Basic tests
      */
     // This represents March 14, 2006 in the default timezone.
--- a/calendar/test/unit/test_utils.js
+++ b/calendar/test/unit/test_utils.js
@@ -16,43 +16,43 @@ function really_run_test() {
     test_sameDay();
     test_binarySearch();
 }
 
 function test_recentzones() {
     let oldDefaultTz = Preferences.get("calendar.timezone.local", "");
     Preferences.set("calendar.timezone.local", "floating");
 
-    equal(cal.getRecentTimezones().length, 0);
-    equal(cal.getRecentTimezones(true).length, 0);
+    equal(cal.dtz.getRecentTimezones().length, 0);
+    equal(cal.dtz.getRecentTimezones(true).length, 0);
 
-    cal.saveRecentTimezone("Europe/Berlin");
+    cal.dtz.saveRecentTimezone("Europe/Berlin");
 
-    let zones = cal.getRecentTimezones();
+    let zones = cal.dtz.getRecentTimezones();
     equal(zones.length, 1);
     equal(zones[0], "Europe/Berlin");
-    zones = cal.getRecentTimezones(true);
+    zones = cal.dtz.getRecentTimezones(true);
     equal(zones.length, 1);
     equal(zones[0].tzid, "Europe/Berlin");
 
-    cal.saveRecentTimezone(cal.calendarDefaultTimezone().tzid);
-    equal(cal.getRecentTimezones().length, 1);
-    equal(cal.getRecentTimezones(true).length, 1);
+    cal.dtz.saveRecentTimezone(cal.dtz.defaultTimezone.tzid);
+    equal(cal.dtz.getRecentTimezones().length, 1);
+    equal(cal.dtz.getRecentTimezones(true).length, 1);
 
-    cal.saveRecentTimezone("Europe/Berlin");
-    equal(cal.getRecentTimezones().length, 1);
-    equal(cal.getRecentTimezones(true).length, 1);
+    cal.dtz.saveRecentTimezone("Europe/Berlin");
+    equal(cal.dtz.getRecentTimezones().length, 1);
+    equal(cal.dtz.getRecentTimezones(true).length, 1);
 
-    cal.saveRecentTimezone("America/New_York");
-    equal(cal.getRecentTimezones().length, 2);
-    equal(cal.getRecentTimezones(true).length, 2);
+    cal.dtz.saveRecentTimezone("America/New_York");
+    equal(cal.dtz.getRecentTimezones().length, 2);
+    equal(cal.dtz.getRecentTimezones(true).length, 2);
 
-    cal.saveRecentTimezone("Unknown");
-    equal(cal.getRecentTimezones().length, 3);
-    equal(cal.getRecentTimezones(true).length, 2);
+    cal.dtz.saveRecentTimezone("Unknown");
+    equal(cal.dtz.getRecentTimezones().length, 3);
+    equal(cal.dtz.getRecentTimezones(true).length, 2);
 
     Preferences.set("calendar.timezone.local", oldDefaultTz);
 }
 
 function test_formatcss() {
     equal(cal.formatStringForCSSRule(" "), "_");
     equal(cal.formatStringForCSSRule("ü"), "-uxfc-");
     equal(cal.formatStringForCSSRule("a"), "a");
@@ -69,61 +69,61 @@ function test_attendeeMatchesAddresses()
     ok(!cal.attendeeMatchesAddresses(a, ["HORSTpeter", "peter"]));
     ok(!cal.attendeeMatchesAddresses(a, ["peter"]));
 }
 
 function test_getDefaultStartDate() {
     function transform(nowString, refDateString) {
         now = cal.createDateTime(nowString);
         let refDate = refDateString ? cal.createDateTime(refDateString) : null;
-        return cal.getDefaultStartDate(refDate);
+        return cal.dtz.getDefaultStartDate(refDate);
     }
 
-    let oldNow = cal.now;
+    let oldNow = cal.dtz.now;
     let now = cal.createDateTime("20120101T000000");
-    cal.now = function() {
+    cal.dtz.now = function() {
         return now;
     };
 
     dump("TT: " + cal.createDateTime("20120101T000000") + "\n");
-    dump("TT: " + cal.getDefaultStartDate(cal.createDateTime("20120101T000000")) + "\n");
+    dump("TT: " + cal.dtz.getDefaultStartDate(cal.createDateTime("20120101T000000")) + "\n");
 
     equal(transform("20120101T000000").icalString, "20120101T010000");
     equal(transform("20120101T015959").icalString, "20120101T020000");
     equal(transform("20120101T230000").icalString, "20120101T230000");
     equal(transform("20120101T235959").icalString, "20120101T230000");
 
     equal(transform("20120101T000000", "20120202").icalString, "20120202T010000");
     equal(transform("20120101T015959", "20120202").icalString, "20120202T020000");
     equal(transform("20120101T230000", "20120202").icalString, "20120202T230000");
     equal(transform("20120101T235959", "20120202").icalString, "20120202T230000");
 
     let event = cal.createEvent();
     now = cal.createDateTime("20120101T015959");
-    cal.setDefaultStartEndHour(event, cal.createDateTime("20120202"));
+    cal.dtz.setDefaultStartEndHour(event, cal.createDateTime("20120202"));
     equal(event.startDate.icalString, "20120202T020000");
     equal(event.endDate.icalString, "20120202T030000");
 
     let todo = cal.createTodo();
     now = cal.createDateTime("20120101T000000");
-    cal.setDefaultStartEndHour(todo, cal.createDateTime("20120202"));
+    cal.dtz.setDefaultStartEndHour(todo, cal.createDateTime("20120202"));
     equal(todo.entryDate.icalString, "20120202T010000");
 
-    cal.now = oldNow;
+    cal.dtz.now = oldNow;
 }
 
 function test_getStartEndProps() {
-    equal(cal.calGetStartDateProp(cal.createEvent()), "startDate");
-    equal(cal.calGetEndDateProp(cal.createEvent()), "endDate");
-    equal(cal.calGetStartDateProp(cal.createTodo()), "entryDate");
-    equal(cal.calGetEndDateProp(cal.createTodo()), "dueDate");
+    equal(cal.dtz.startDateProp(cal.createEvent()), "startDate");
+    equal(cal.dtz.endDateProp(cal.createEvent()), "endDate");
+    equal(cal.dtz.startDateProp(cal.createTodo()), "entryDate");
+    equal(cal.dtz.endDateProp(cal.createTodo()), "dueDate");
 
-    throws(() => cal.calGetStartDateProp(null),
+    throws(() => cal.dtz.startDateProp(null),
            /2147500033/);
-    throws(() => cal.calGetEndDateProp(null),
+    throws(() => cal.dtz.endDateProp(null),
            /2147500033/);
 }
 
 function test_calOperationGroup() {
     let cancelCalled = false;
     function cancelFunc() {
         cancelCalled = true;
         return true;
@@ -169,20 +169,20 @@ function test_calOperationGroup() {
     ok(!group.isPending);
     ok(cancelCalled);
     ok(pendingOp2.cancelCalled);
 }
 
 function test_sameDay() {
     let createDate = cal.createDateTime.bind(cal);
 
-    ok(cal.sameDay(createDate("20120101"), createDate("20120101T120000")));
-    ok(cal.sameDay(createDate("20120101"), createDate("20120101")));
-    ok(!cal.sameDay(createDate("20120101"), createDate("20120102")));
-    ok(!cal.sameDay(createDate("20120101T120000"), createDate("20120102T120000")));
+    ok(cal.dtz.sameDay(createDate("20120101"), createDate("20120101T120000")));
+    ok(cal.dtz.sameDay(createDate("20120101"), createDate("20120101")));
+    ok(!cal.dtz.sameDay(createDate("20120101"), createDate("20120102")));
+    ok(!cal.dtz.sameDay(createDate("20120101T120000"), createDate("20120102T120000")));
 }
 
 function test_binarySearch() {
     let arr = [2, 5, 7, 9, 20, 27, 34, 39, 41, 53, 62];
     equal(cal.binarySearch(arr, 27), 5); // Center
     equal(cal.binarySearch(arr, 2), 0); // Left most
     equal(cal.binarySearch(arr, 62), 11); // Right most