зеркало из https://github.com/mozilla/gecko-dev.git
Make the dates shown in the Expired Certificate alert have consistent (short) format. Bug 246905, patch by Constantine A. Murenin <cnst+bmo@bugmail.mojo.ru>, r=jgmyers, sr=brendan
This commit is contained in:
Родитель
6d9ff886f2
Коммит
159e0a2eab
|
@ -55,9 +55,15 @@ function onLoad()
|
|||
var bundle = srGetStrBundle("chrome://pippki/locale/pippki.properties");
|
||||
var message1 = dialogParams.GetString(1);
|
||||
|
||||
var currDate = new Date();
|
||||
const nsIScriptableDateFormat = Components.interfaces.nsIScriptableDateFormat;
|
||||
var dateService = Components.classes["@mozilla.org/intl/scriptabledateformat;1"].getService(nsIScriptableDateFormat);
|
||||
var date = new Date();
|
||||
var dateStr = dateService.FormatDateTime("", dateService.dateFormatShort, dateService.timeFormatNoSeconds,
|
||||
date.getFullYear(), date.getMonth()+1, date.getDate(),
|
||||
date.getHours(), date.getMinutes(), date.getSeconds());
|
||||
|
||||
var message2 = bundle.formatStringFromName("serverCertExpiredMsg2",
|
||||
[ currDate.toLocaleString() ],
|
||||
[ dateStr ],
|
||||
1);
|
||||
setText("message1", message1);
|
||||
setText("message2", message2);
|
||||
|
|
Загрузка…
Ссылка в новой задаче