add: end   = end.getInTimezone(currentTimezone); 
context: function getDialogSettings(){    var settings = new Object();    var ccalendar = window.opener.getCompositeCalendar();    var listener = {        mEventArray: new Array(),        onOperationComplete: function (aCalendar, aStatus, aOperationType, aId, aDateTime) {            settings.eventList = listener.mEventArray;            settings.start = start;            settings.end = end;        },        onGetResult: function (aCalendar, aStatus, aItemType, aDetail, aCount, aItems) {            for (var i = 0; i < aCount; i++) {                listener.mEventArray.push(aItems[i]);            }        }    };    var filter = ccalendar.ITEM_FILTER_TYPE_EVENT |                  ccalendar.ITEM_FILTER_CLASS_OCCURRENCES;    var start;    var end;    var eventList;    var theView = window.opener.currentView();    switch (document.getElementById("view-field").selectedItem.value) {        case 'currentview':        case '': //just in case            start = theView.startDay;            end   = theView.endDay;            break;        case 'selected':            eventList = theView.getSelectedItems({});            break;        case 'custom':            start = jsDateToDateTime(document.getElementById("start-date-picker").value);            end   = jsDateToDateTime(document.getElementById("end-date-picker").value);            break ;        default :            dump("Error : no case in printDialog.js::printCalendar()");    }    if (!eventList) {        // end isn't exclusive, so we need to add one day        end = end.clone();        end.day = end.day + 1;        end.normalize();        ccalendar.getItems(filter, 0, start, end, listener);    } else {        settings.eventList = eventList;        settings.start = null;        settings.end = null;    }    var tempTitle = document.getElementById("title-field").value;    settings.title = (tempTitle || calGetString("calendar", "Untitled"));    settings.layoutCId = document.getElementById("layout-field").value;    return settings;}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/054cd194f803f939cb99c3c98beee4d0adbf82fc/printDialog.js/buggy/calendar/resources/content/printDialog.js