rem: var m = (new Date()).toString().match(/[^(]* ([^ ]*) \(([^)]+)\)/); var offset = m[1]; var timezone = m[2]; 
add: var probableTZ = null; var summerTZname = null; var winterTZname = null; var summerDate = (new Date(2005,6,20)).toString(); var winterDate = (new Date(2005,12,20)).toString(); var summerData = summerDate.match(/[^(]* ([^ ]*) \(([^)]+)\)/); var winterData = winterDate.match(/[^(]* ([^ ]*) \(([^)]+)\)/); if (summerData && summerData[2]) summerTZname = summerData[2]; if (winterData && winterData[2]) winterTZname = winterData[2];  var index = summerDate.indexOf('+'); if (index < 0) index = summerDate.indexOf('-');  var summerOffset = summerDate.substr(index, 5); index = winterDate.indexOf('+'); if (index < 0) index = winterDate.indexOf('-');  var winterOffset = winterDate.substr(index, 5); 
context: function guessSystemTimezone(){    var m = (new Date()).toString().match(/[^(]* ([^ ]*) \(([^)]+)\)/);    var offset = m[1];    var timezone = m[2];    dump("Guessing system timezone:\n");    dump("offset  : " + offset + "\ntimezone: " + timezone + "\n");    var tzindex = offset + " " + timezone;    if (tzindex in tzTable) {        return tzTable[tzindex];    } else {        // XXX we don't really have a better option here        return "floating";    }}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/0effe4340c821e67eabdd1a51fe1c2fab0e7d516/calendarUtils.js/buggy/calendar/resources/content/calendarUtils.js