rem: var startTime = gStartTime.clone(); var endTime = gEndTime.clone(); 
add: var startTime = gStartTime.getInTimezone(gStartTimezone); var endTime = gEndTime.getInTimezone(gEndTimezone); 
context: function updateDateTime(){  //gConsoleService.logStringMessage(    //"### updateDateTime()\n"+    //"startTime: "+gStartTime.toString()+"\n"+    //"endTime: "+gEndTime.toString()+"\n");  gIgnoreUpdate = true;  var item = window.calendarItem;  var menuItem = document.getElementById('menu-options-timezone');  // convert to default timezone if the timezone option  // is *not* checked, otherwise keep the specific timezone  // and display the labels in order to modify the timezone.  if(menuItem.getAttribute('checked') == 'true') {    if (isEvent(item)) {      var startTime = gStartTime.clone();      var endTime = gEndTime.clone();      if (startTime.isDate)        setElementValue("event-all-day", true, "checked");      // in the case where the timezones are different but      // the timezone of the endtime is "UTC", we convert      // the endtime into the timezone of the starttime.      if(startTime && endTime) {        if(startTime.timezone != endTime.timezone) {          if(endTime.timezone == "UTC") {            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 = "floating";      endTime.timezone = "floating";      setElementValue("event-starttime",startTime.jsDate);      setElementValue("event-endtime",endTime.jsDate);    }            if (isToDo(item)) {          var startTime = gStartTime ? gStartTime.clone() : null;      var endTime = gEndTime ? gEndTime.clone() : null;          var hasEntryDate = (startTime != null);      var hasDueDate = (endTime != null);      if(hasEntryDate) {        setElementValue("todo-has-entrydate", hasEntryDate, "checked");        startTime.timezone = "floating";        setElementValue("todo-entrydate",startTime.jsDate);      } else if(hasDueDate) {        endTime.timezone = "floating";        setElementValue("todo-entrydate",endTime.jsDate);      }            if(hasDueDate) {        setElementValue("todo-has-duedate", hasDueDate, "checked");        endTime.timezone = "floating";        setElementValue("todo-duedate",endTime.jsDate);      } else if(hasEntryDate) {        startTime.timezone = "floating";        setElementValue("todo-duedate",startTime.jsDate);      }    }          } else {    var kDefaultTimezone = calendarDefaultTimezone();    if (isEvent(item)) {      var startTime = gStartTime.getInTimezone(kDefaultTimezone);      var endTime = gEndTime.getInTimezone(kDefaultTimezone);      if (startTime.isDate)        setElementValue("event-all-day", true, "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 = "floating";      endTime.timezone = "floating";      setElementValue("event-starttime",startTime.jsDate);      setElementValue("event-endtime",endTime.jsDate);    }    if (isToDo(item)) {          var startTime = gStartTime ? gStartTime.getInTimezone(kDefaultTimezone) : null;      var endTime = gEndTime ? gEndTime.getInTimezone(kDefaultTimezone) : null;          var hasEntryDate = (startTime != null);      var hasDueDate = (endTime != null);      if(hasEntryDate) {        setElementValue("todo-has-entrydate", hasEntryDate, "checked");        startTime.timezone = "floating";        setElementValue("todo-entrydate",startTime.jsDate);      } else if(hasDueDate) {        endTime.timezone = "floating";        setElementValue("todo-entrydate",endTime.jsDate);      }            if(hasDueDate) {        setElementValue("todo-has-duedate", hasDueDate, "checked");        endTime.timezone = "floating";        setElementValue("todo-duedate",endTime.jsDate);      } else if(hasEntryDate) {        startTime.timezone = "floating";        setElementValue("todo-duedate",startTime.jsDate);      }    }  }    updateTimezone();  updateAllDay();    gIgnoreUpdate = false;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/ca7555ce4d97c6f483b0d7c2b63d950532b4cc27/sun-calendar-event-dialog.js/clean/calendar/prototypes/wcap/sun-calendar-event-dialog.js