From 2b47e744e2d08ed276a88efa252515370d4a2583 Mon Sep 17 00:00:00 2001 From: Charles He Date: Mon, 20 Feb 2017 17:32:12 +0000 Subject: [PATCH] Display longer date string in certificate information Previously the date string used for "issued on" and "expires on" fields are in short format (e.g. 2/3/17), which is ambiguous. In this CL we use the date format of medium length (e.g. 2 Mar 2017) which also adjusts automatically to the system locale. Bug: 34428233 Test: manual, by opening Settings > Security > Certificates > any certificate Change-Id: I5eff133d5c621e3e9969c7cf22ec757bd2b48dc4 --- core/java/android/net/http/SslCertificate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/net/http/SslCertificate.java b/core/java/android/net/http/SslCertificate.java index 2715af0261df4..4c0f4181e83f3 100644 --- a/core/java/android/net/http/SslCertificate.java +++ b/core/java/android/net/http/SslCertificate.java @@ -506,6 +506,6 @@ public class SslCertificate { if (certificateDate == null) { return ""; } - return DateFormat.getDateFormat(context).format(certificateDate); + return DateFormat.getMediumDateFormat(context).format(certificateDate); } }