From b1cd74dd49e21def5219cba91d0ab9a7d1b435d8 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Sat, 6 Nov 2021 02:51:24 +0300 Subject: [PATCH] Fix time formatting (#1536) --- src/util/dateFormat.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/dateFormat.ts b/src/util/dateFormat.ts index 0ee868dc2..ad7af402b 100644 --- a/src/util/dateFormat.ts +++ b/src/util/dateFormat.ts @@ -41,7 +41,7 @@ export function formatTime(datetime: number | Date, lang: LangFn) { minute: '2-digit', }); - return timeFormat === '12h' ? time.replace(/^0:/, '12:') : time; + return timeFormat === '12h' ? time.replace(/^0:/, '12:') : time.replace('24:', '00:'); } export function formatPastTimeShort(lang: LangFn, datetime: number | Date) {