mirror of https://github.com/zulip/zulip.git
edit_history: Respect time format setting (12h/24h).
Previously, the edit history modal did not respect the time format
setting (whether to show times in 12-hour or 24-hour format) when
displaying message edit times (#15171).
This commit fixes that by passing the edit times to
timerender.stringify_time(), which takes that setting into account,
instead of just doing a static string formatting operation.
This bug has existed since February 2017, when the edit history UI
was first added in 1a697b6e02
.
Fixes #15171.
This commit is contained in:
parent
8451fb6700
commit
76c62deae1
|
@ -13,7 +13,7 @@ exports.fetch_and_render_message_history = function (message) {
|
||||||
const time = new XDate(msg.timestamp * 1000);
|
const time = new XDate(msg.timestamp * 1000);
|
||||||
const datestamp = time.toDateString();
|
const datestamp = time.toDateString();
|
||||||
const item = {
|
const item = {
|
||||||
timestamp: time.toString('h:mm TT'),
|
timestamp: timerender.stringify_time(time),
|
||||||
display_date: time.toString("MMMM d, yyyy"),
|
display_date: time.toString("MMMM d, yyyy"),
|
||||||
show_date_row: datestamp !== prev_datestamp,
|
show_date_row: datestamp !== prev_datestamp,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue