From 65dd2d4db1fec936889629366c8f108953503e04 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Fri, 26 May 2017 13:43:01 -0600 Subject: [PATCH] Fix PM being AM Fixes https://github.com/vector-im/riot-web/issues/4043 Signed-off-by: Travis Ralston --- src/DateUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DateUtils.js b/src/DateUtils.js index 8b7a2f3f20..e8f92e34fa 100644 --- a/src/DateUtils.js +++ b/src/DateUtils.js @@ -54,7 +54,7 @@ function pad(n) { function twelveHourTime(date) { let hours = date.getHours() % 12; const minutes = pad(date.getMinutes()); - const ampm = hours >= 12 ? 'PM' : 'AM'; + const ampm = date.getHours() >= 12 ? 'PM' : 'AM'; hours = pad(hours ? hours : 12); return `${hours}:${minutes} ${ampm}`; }