From 90e1f58ced5f82eeef631bc925d829c44ee31914 Mon Sep 17 00:00:00 2001 From: "jminta%gmail.com" Date: Fri, 2 Jun 2006 19:59:11 +0000 Subject: [PATCH] Bug 339509 (Sunbird version) Wrong day selected in views if selected timezone does not match system timezone, patch by thomas.benisch@sun.com, r=jminta git-svn-id: svn://10.0.0.236/trunk@198896 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/calendar/resources/content/calendarWindow.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mozilla/calendar/resources/content/calendarWindow.js b/mozilla/calendar/resources/content/calendarWindow.js index 220829c013f..8f07695e2bc 100644 --- a/mozilla/calendar/resources/content/calendarWindow.js +++ b/mozilla/calendar/resources/content/calendarWindow.js @@ -337,7 +337,15 @@ CalendarWindow.prototype.goToPrevious = function calWin_goToPrevious( value ) CalendarWindow.prototype.goToDay = function calWin_goToDay( newDate ) { - document.getElementById("view-deck").selectedPanel.goToDay(jsDateToDateTime(newDate)); + var view = document.getElementById("view-deck").selectedPanel; + var cdt = Components.classes["@mozilla.org/calendar/datetime;1"] + .createInstance(Components.interfaces.calIDateTime); + cdt.year = newDate.getFullYear(); + cdt.month = newDate.getMonth(); + cdt.day = newDate.getDate(); + cdt.isDate = true; + cdt.timezone = view.timezone; + view.goToDay(cdt); } /** PUBLIC