diff options
author | Moonchild <moonchild@palemoon.org> | 2020-12-15 15:09:30 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-12-15 15:09:30 +0000 |
commit | dabdec3b3ae9cd920e9fe75622a10ce290552941 (patch) | |
tree | 4d462fe7a5f314369f373f6a42214bc9c0efbfcb /toolkit/mozapps/update | |
parent | 5165ed02285315cc0bed7977c7bac6d0a90ca43c (diff) | |
parent | cd17592001225e2d988c3aca9bd700de3c8ce4a3 (diff) | |
download | UXP-dabdec3b3ae9cd920e9fe75622a10ce290552941.tar UXP-dabdec3b3ae9cd920e9fe75622a10ce290552941.tar.gz UXP-dabdec3b3ae9cd920e9fe75622a10ce290552941.tar.lz UXP-dabdec3b3ae9cd920e9fe75622a10ce290552941.tar.xz UXP-dabdec3b3ae9cd920e9fe75622a10ce290552941.zip |
Merge branch 'redwood' into releaseRC_20201215
Diffstat (limited to 'toolkit/mozapps/update')
-rw-r--r-- | toolkit/mozapps/update/content/history.js | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/toolkit/mozapps/update/content/history.js b/toolkit/mozapps/update/content/history.js index c5bbccefc..809eee478 100644 --- a/toolkit/mozapps/update/content/history.js +++ b/toolkit/mozapps/update/content/history.js @@ -58,13 +58,18 @@ var gUpdateHistory = { * @returns A human readable date string */ _formatDate: function(seconds) { + var sdf = + Components.classes["@mozilla.org/intl/scriptabledateformat;1"]. + getService(Components.interfaces.nsIScriptableDateFormat); var date = new Date(seconds); - const locale = Components.classes["@mozilla.org/chrome/chrome-registry;1"] - .getService(Components.interfaces.nsIXULChromeRegistry) - .getSelectedLocale("global", true); - const dtOptions = { year: 'numeric', month: 'long', day: 'numeric', - hour: 'numeric', minute: 'numeric', second: 'numeric' }; - return date.toLocaleString(locale, dtOptions); + return sdf.FormatDateTime("", sdf.dateFormatLong, + sdf.timeFormatSeconds, + date.getFullYear(), + date.getMonth() + 1, + date.getDate(), + date.getHours(), + date.getMinutes(), + date.getSeconds()); } }; |