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

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

Issue 299323002: Modified the certificate details viewers to include the timezone in the certificates validity dates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Modified the IDS variables names. Created 6 years, 7 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 f67d3498bf7798367c0957fbdcdde62f90f54064..4969b3e2ae8431acdc0df1abd4ae3cffae43f45d 100644
--- a/chrome/browser/ui/webui/certificate_viewer_webui.cc
+++ b/chrome/browser/ui/webui/certificate_viewer_webui.cc
@@ -347,10 +347,16 @@ void CertificateViewerDialogHandler::RequestCertificateFields(
l10n_util::GetStringUTF8(IDS_CERT_DETAILS_NOT_AFTER));
base::Time issued, expires;
if (x509_certificate_model::GetTimes(cert, &issued, &expires)) {
- node_details->SetString("payload.val",
- base::UTF16ToUTF8(base::TimeFormatShortDateAndTime(issued)));
- alt_node_details->SetString("payload.val",
- base::UTF16ToUTF8(base::TimeFormatShortDateAndTime(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));
+ alt_node_details->SetString(
+ "payload.val",
+ base::UTF16ToUTF8(base::TimeFormatShortDateAndTime(expires)) + " " +
+ l10n_util::GetStringUTF8(IDS_CERT_DETAILS_UTC_TIMEZONE));
}
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