This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git

commit ae9032fbd126f833bd009d4677bcf67d963b87e0
Author: Sebb <[email protected]>
AuthorDate: Fri Nov 26 13:54:50 2021 +0000

    Show TZ in time display using default Locale
---
 webui/js/source/aavariables.js  | 3 +++
 webui/js/source/render-email.js | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/webui/js/source/aavariables.js b/webui/js/source/aavariables.js
index 702da08..b3e3420 100644
--- a/webui/js/source/aavariables.js
+++ b/webui/js/source/aavariables.js
@@ -57,12 +57,15 @@ const CALENDAR_YEARS_SHOWN = 4; // TODO: should this be 
configurable?
 // datepicker
 const DAYS_SHORTENED = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
 
+// render_email_chatty
 const PONYMAIL_DATE_FORMAT = {
     weekday: 'long',
     year: 'numeric',
     month: 'long',
     day: 'numeric'
 };
+const PONYMAIL_TIME_FORMAT = { timeStyle: 'long'}; // ensure TZ is shown
+
 let G_collated_json = {};
 
 if (pm_config.G_apiURL) {
diff --git a/webui/js/source/render-email.js b/webui/js/source/render-email.js
index e7117a4..f239230 100644
--- a/webui/js/source/render-email.js
+++ b/webui/js/source/render-email.js
@@ -225,7 +225,7 @@ async function render_email_chatty(state, json) {
     let when = new Date(json.epoch * 1000.0);
     let ldate = when.toISOString();
     try {
-        ldate = "%s %s".format(when.toLocaleDateString(undefined, 
PONYMAIL_DATE_FORMAT), when.toLocaleTimeString());
+        ldate = "%s %s".format(when.toLocaleDateString(undefined, 
PONYMAIL_DATE_FORMAT), when.toLocaleTimeString(undefined, 
PONYMAIL_TIME_FORMAT));
     } catch (e) {
 
     }

Reply via email to