rem: try { var dateStarted = stmt.getInt64(0); dateStarted = new Date(dateStarted/1000); dateStarted = dateTimeService.FormatDateTime("", dateTimeService.dateFormatShort, dateTimeService.timeFormatSeconds, dateStarted.getFullYear(), dateStarted.getMonth()+1, dateStarted.getDate(), dateStarted.getHours(), dateStarted.getMinutes(), dateStarted.getSeconds()); dateStartedField.setAttribute("value", dateStarted); } catch (e) { } 
add: var dateStarted = new Date(stmt.getInt64(0) / 1000); dateStarted = dts.FormatDateTime("", dts.dateFormatShort, dts.timeFormatSeconds, dateStarted.getFullYear(), dateStarted.getMonth() + 1, dateStarted.getDate(), dateStarted.getHours(), dateStarted.getMinutes(), dateStarted.getSeconds()); dateStartedField.setAttribute("value", dateStarted); 
context: function Startup(){  const dlmgrContractID = "@mozilla.org/download-manager;1";  const dlmgrIID = Components.interfaces.nsIDownloadManager;  var downloadMgr = Components.classes[dlmgrContractID].getService(dlmgrIID);  var db = downloadMgr.DBConnection;    const dateTimeContractID = "@mozilla.org/intl/scriptabledateformat;1";  const dateTimeIID = Components.interfaces.nsIScriptableDateFormat;  var dateTimeService = Components.classes[dateTimeContractID].getService(dateTimeIID);    var dateStartedField = document.getElementById("dateStarted");  var dateEndedField = document.getElementById("dateEnded");  var pathField = document.getElementById("path");  var sourceField = document.getElementById("source");  var dlid = window.arguments[0].replace(/^dl([0-9]+)$/, "$1");  var stmt = db.createStatement("SELECT startTime, endTime, target, source " +                                "FROM moz_downloads " +                                "WHERE id = ?1");  stmt.bindInt64Parameter(0, dlid);  stmt.executeStep();  try {    var dateStarted = stmt.getInt64(0);    dateStarted = new Date(dateStarted/1000);    dateStarted = dateTimeService.FormatDateTime("", dateTimeService.dateFormatShort, dateTimeService.timeFormatSeconds, dateStarted.getFullYear(), dateStarted.getMonth()+1, dateStarted.getDate(), dateStarted.getHours(), dateStarted.getMinutes(), dateStarted.getSeconds());    dateStartedField.setAttribute("value", dateStarted);  }  catch (e) {  }    try {    var dateEnded = stmt.getInt64(1);    dateEnded = new Date(dateEnded/1000);    dateEnded = dateTimeService.FormatDateTime("", dateTimeService.dateFormatShort, dateTimeService.timeFormatSeconds, dateEnded.getFullYear(), dateEnded.getMonth()+1, dateEnded.getDate(), dateEnded.getHours(), dateEnded.getMinutes(), dateEnded.getSeconds());    dateEndedField.setAttribute("value", dateEnded);  }  catch (e) {  }    pathField.value = stmt.getUTF8String(2);  sourceField.value = stmt.getUTF8String(3);  stmt.reset();  try {    window.opener.gDownloadManager.getDownload(dlid);  } catch (e) { // Download is not currently active    document.getElementById("dateEndedRow").hidden = true;    document.getElementById("dateEndedSeparator").hidden = true;  }    document.documentElement.getButton("accept").label = document.documentElement.getAttribute("acceptbuttontext");    document.documentElement.getButton("accept").focus();}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8395/144c0bc88ec10b452a70e1a07387afc0377daa17/downloadProperties.js/buggy/toolkit/mozapps/downloads/content/downloadProperties.js