From 6daa33600d5cd7849569bca8ed8eb30b1cf9a699 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 14 Jan 2021 20:13:14 +0530 Subject: [PATCH] E-book viewer: Fix clock being displayed in 24 hr format on some systems even though system locale is set to use 12 hr format. --- src/pyj/date.pyj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pyj/date.pyj b/src/pyj/date.pyj index 2e6b1053c8..c5d0730173 100644 --- a/src/pyj/date.pyj +++ b/src/pyj/date.pyj @@ -40,7 +40,7 @@ def fmt_date_pat(): def fd_format_hour(dt, ampm, hr, as_utc): h = dt.getUTCHours() if as_utc else dt.getHours() if ampm: - h = h % 12 + h %= 12 return h.toString() if hr.length is 1 else str.format('{:02d}', h) @@ -128,7 +128,7 @@ fd_function_index = { def am_pm_pat(): ans = am_pm_pat.ans if not ans?: - ans = am_pm_pat.ans = /(ap)|(a)/ + ans = am_pm_pat.ans = /(ap)|(a)|(AP)|(A)/ return ans