add: alarmOffset.isNegative = true; 
context: function setDefaultAlarmValues(aItem){    var prefService = Components.classes["@mozilla.org/preferences-service;1"]                                .getService(Components.interfaces.nsIPrefService);    var alarmsBranch = prefService.getBranch("calendar.alarms.");    if (isEvent(aItem)) {        try {            if (alarmsBranch.getIntPref("onforevents") == 1) {                var alarmOffset = Components.classes["@mozilla.org/calendar/duration;1"]                                            .createInstance(Components.interfaces.calIDuration);                try {                    var units = alarmsBranch.getCharPref("eventalarmunit");                    alarmOffset[units] = alarmsBranch.getIntPref("eventalarmlen");                } catch(ex) {                    alarmOffset.minutes = 15;                }                aItem.alarmOffset  = alarmOffset;                aItem.alarmRelated = Components.interfaces.calIItemBase.ALARM_RELATED_START;            }        } catch (ex) {            Components.utils.reportError(                "Failed to apply default alarm settings to event: " + ex);        }    } else if (isToDo(aItem)) {        try {            if (alarmsBranch.getIntPref("onfortodos") == 1) {                // You can't have an alarm if the entryDate doesn't exist.                if (!aItem.entryDate) {                    aItem.entryDate = getSelectedDay().clone();                }                var alarmOffset = Components.classes["@mozilla.org/calendar/duration;1"]                                            .createInstance(Components.interfaces.calIDuration);                try {                    var units = alarmsBranch.getCharPref("todoalarmunit");                    alarmOffset[units] = alarmsBranch.getIntPref("todoalarmlen");                } catch(ex) {                    alarmOffset.minutes = 15;                }                aItem.alarmOffset  = alarmOffset;                aItem.alarmRelated = Components.interfaces.calIItemBase.ALARM_RELATED_START;            }        } catch (ex) {            Components.utils.reportError(                "Failed to apply default alarm settings to task: " + ex);        }    }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/f654dfda15b662697e519e617f0a5a6ba1a6234b/calendarUtils.js/buggy/calendar/resources/content/calendarUtils.js