Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
timerender: Fix use of page_params.timezone.
Tim Abbotta785a74fd0db
diff --git a/static/js/rendered_markdown.js b/static/js/rendered_markdown.jsindex c2355c39964..ff5185de792 100644--- a/static/js/rendered_markdown.js+++ b/static/js/rendered_markdown.js@@ -153,8 +153,7 @@ exports.update_elements = (content) => {const timestamp = moment(time_str);if (timestamp.isValid()) {const text = $(this).text();- const rendered_time = timerender.render_markdown_timestamp(timestamp,- null, text);+ const rendered_time = timerender.render_markdown_timestamp(timestamp, text);$(this).text(rendered_time.text);$(this).attr('title', rendered_time.title);} else {diff --git a/static/js/timerender.js b/static/js/timerender.jsindex 41ae31e1dd6..c01b90de950 100644--- a/static/js/timerender.js+++ b/static/js/timerender.js@@ -165,12 +165,7 @@ exports.render_date = function (time, time_above, today) {};// Renders the timestamp returned by the <time:> markdown syntax.-exports.render_markdown_timestamp = function (time, now, text) {- now = now || moment();- if (page_params.timezone) {- now = now.tz(page_params.timezone);- time = time.tz(page_params.timezone);- }+exports.render_markdown_timestamp = function (time, text) {const hourformat = page_params.twenty_four_hour_time ? 'HH:mm' : 'h:mm A';const timestring = time.format('ddd, MMM D YYYY, ' + hourformat);const titlestring = "This time is in your timezone. Original text was '" + text + "'.";