]> gitweb.stoutner.com Git - PrivacyBrowserAndroid.git/blobdiff - app/src/main/java/com/stoutner/privacybrowser/dialogs/SslCertificateError.java
Localize the start and end dates for `ViewSslCertificate.java` and `SslCertificateErr...
[PrivacyBrowserAndroid.git] / app / src / main / java / com / stoutner / privacybrowser / dialogs / SslCertificateError.java
index 1e95616258c9cae22d326319eba331bd165db9cb..10afe62e98f133b79709961e846c9388954d8dba 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * Copyright 2016 Soren Stoutner <soren@stoutner.com>.
+ * Copyright 2016-2017 Soren Stoutner <soren@stoutner.com>.
  *
  * This file is part of Privacy Browser <https://www.stoutner.com/privacy-browser>.
  *
@@ -37,6 +37,7 @@ import android.widget.TextView;
 
 import com.stoutner.privacybrowser.R;
 
+import java.text.DateFormat;
 import java.util.Date;
 
 public class SslCertificateError extends AppCompatDialogFragment {
@@ -76,8 +77,8 @@ public class SslCertificateError extends AppCompatDialogFragment {
         argumentsBundle.putString("IssuedByCName", issuedByCNameForBundle);
         argumentsBundle.putString("IssuedByOName", issuedByONameForBundle);
         argumentsBundle.putString("IssuedByUName", issuedByUNameForBundle);
-        argumentsBundle.putString("StartDate", startDateForBundle.toString());
-        argumentsBundle.putString("EndDate", endDateForBundle.toString());
+        argumentsBundle.putString("StartDate", DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.LONG).format(startDateForBundle));
+        argumentsBundle.putString("EndDate", DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.LONG).format(endDateForBundle));
 
         // Add `argumentsBundle` to this instance of `SslCertificateError`.
         SslCertificateError thisSslCertificateErrorDialog = new SslCertificateError();