about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiXSearch.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-12-13 00:50:11 +0000
committerEric Wong <e@80x24.org>2023-12-13 09:01:50 +0000
commite3444977887f7615cef271341f29f3a87a36eac9 (patch)
tree3a233a7f19e4fc27d112f6c8090ff58ab0164add /lib/PublicInbox/LeiXSearch.pm
parentd465c70450006f2ad435d5a0d48261ac8ebc8fa1 (diff)
downloadpublic-inbox-e3444977887f7615cef271341f29f3a87a36eac9.tar.gz
The musl strftime(3) implementation on AlpineLinux 3.19.0
doesn't support `%k' and `%k' isn't in POSIX, either.  So we
fall back to using the `sprintf' perlop in the user-facing UI
since leading zeroes require needless overhead for my eyes and
brain to parse in the time.
Diffstat (limited to 'lib/PublicInbox/LeiXSearch.pm')
-rw-r--r--lib/PublicInbox/LeiXSearch.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiXSearch.pm b/lib/PublicInbox/LeiXSearch.pm
index cee3ad07..fc95d401 100644
--- a/lib/PublicInbox/LeiXSearch.pm
+++ b/lib/PublicInbox/LeiXSearch.pm
@@ -298,8 +298,9 @@ sub fudge_qstr_time ($$$) {
                 $rft = $diff;
         }
         $lr -= ($rft || (48 * 60 * 60));
+        require PublicInbox::Admin;
         $lei->qerr("# $uri limiting to ".
-                strftime('%Y-%m-%d %k:%M %z', localtime($lr)). ' and newer');
+                PublicInbox::Admin::fmt_localtime($lr).' and newer');
         # this should really be rt: (received-time), but no stable
         # public-inbox releases support it, yet.
         my $dt = 'dt:'.strftime('%Y%m%d%H%M%S', gmtime($lr)).'..';