Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(906)

Unified Diff: chrome/browser/ui/webui/certificate_viewer_webui.cc

Issue 827123004: The Certificate Web UI incorrectly formats the issued and expires dates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Rebase on ToT Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/certificate_viewer_webui.cc
diff --git a/chrome/browser/ui/webui/certificate_viewer_webui.cc b/chrome/browser/ui/webui/certificate_viewer_webui.cc
index 7969a5211133a4bf74c8dd94a935cb5c2434872f..57efa4d49b8e526ea63163d4354e304d155cd043 100644
--- a/chrome/browser/ui/webui/certificate_viewer_webui.cc
+++ b/chrome/browser/ui/webui/certificate_viewer_webui.cc
@@ -350,16 +350,14 @@ void CertificateViewerDialogHandler::RequestCertificateFields(
l10n_util::GetStringUTF8(IDS_CERT_DETAILS_NOT_AFTER));
base::Time issued, expires;
if (x509_certificate_model::GetTimes(cert, &issued, &expires)) {
- // The object Time internally saves the time in UTC timezone. This is why we
- // do a simple UTC string concatenation.
node_details->SetString(
"payload.val",
- base::UTF16ToUTF8(base::TimeFormatShortDateAndTime(issued)) + " " +
- l10n_util::GetStringUTF8(IDS_CERT_DETAILS_UTC_TIMEZONE));
+ base::UTF16ToUTF8(
+ base::TimeFormatShortDateAndTimeWithTimeZone(issued)));
alt_node_details->SetString(
"payload.val",
- base::UTF16ToUTF8(base::TimeFormatShortDateAndTime(expires)) + " " +
- l10n_util::GetStringUTF8(IDS_CERT_DETAILS_UTC_TIMEZONE));
+ base::UTF16ToUTF8(
+ base::TimeFormatShortDateAndTimeWithTimeZone(expires)));
}
cert_fields->Append(node_details = new base::DictionaryValue());
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698