add: } else { gEndTimezone = kDefaultTimezone; 
context: function loadDateTime(item) {  if (isEvent(item)) {    var startTime = item.startDate;    var endTime = item.endDate;    var duration = endTime.subtractDate(startTime);        // Check if an all-day event has been passed in (to adapt endDate).    if (startTime.isDate) {      startTime = startTime.clone();      endTime = endTime.clone();      endTime.day -= 1;      duration.days -= 1;      // The date/timepicker uses jsDate internally. Because jsDate does      // not know the concept of dates we end up displaying times unequal      // to 00:00 for all-day events depending on local timezone setting.       // Calling normalize() recalculates that times to represent 00:00      // in local timezone.      endTime.normalize();      startTime.normalize();    }    // store the start/end-times as calIDateTime-objects    // converted to the default timezone. store the timezones    // separately.    var kDefaultTimezone = calendarDefaultTimezone();    gStartTimezone = startTime.timezone;    gEndTimezone = endTime.timezone;    gStartTime = startTime.getInTimezone(kDefaultTimezone);    gEndTime = endTime.getInTimezone(kDefaultTimezone);    gItemDuration = duration;  }  if (isToDo(item)) {    var startTime = null;    var endTime = null;    var duration = null;        var kDefaultTimezone = calendarDefaultTimezone();    var hasEntryDate = (item.entryDate != null);    if (hasEntryDate) {      startTime = item.entryDate;      gStartTimezone = startTime.timezone;      startTime = startTime.getInTimezone(kDefaultTimezone);    }    var hasDueDate = (item.dueDate != null);    if (hasDueDate) {      endTime = item.dueDate;      gEndTimezone = endTime.timezone;      endTime = endTime.getInTimezone(kDefaultTimezone);    }    if (hasEntryDate && hasDueDate)      duration = endTime.subtractDate(startTime);    gStartTime = startTime;    gEndTime = endTime;    gItemDuration = duration;  }}
meta: 5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5872/37d3cc73395ea8c5a4a16a9e39ca07b3fc773ae9/sun-calendar-event-dialog.js/clean/calendar/prototypes/wcap/sun-calendar-event-dialog.js