diff options
author | Eric Wong <e@80x24.org> | 2023-12-13 00:50:11 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-12-13 09:01:50 +0000 |
commit | e3444977887f7615cef271341f29f3a87a36eac9 (patch) | |
tree | 3a233a7f19e4fc27d112f6c8090ff58ab0164add /lib/PublicInbox/ExtSearchIdx.pm | |
parent | d465c70450006f2ad435d5a0d48261ac8ebc8fa1 (diff) | |
download | public-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/ExtSearchIdx.pm')
-rw-r--r-- | lib/PublicInbox/ExtSearchIdx.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/ExtSearchIdx.pm b/lib/PublicInbox/ExtSearchIdx.pm index 7b7436ea..53078124 100644 --- a/lib/PublicInbox/ExtSearchIdx.pm +++ b/lib/PublicInbox/ExtSearchIdx.pm @@ -20,7 +20,6 @@ use parent qw(PublicInbox::ExtSearch PublicInbox::Umask PublicInbox::Lock); use Carp qw(croak carp); use Scalar::Util qw(blessed); use Sys::Hostname qw(hostname); -use POSIX qw(strftime); use File::Glob qw(bsd_glob GLOB_NOSORT); use PublicInbox::MultiGit; use PublicInbox::Search; @@ -34,6 +33,7 @@ use PublicInbox::ContentHash qw(content_hash); use PublicInbox::Eml; use PublicInbox::DS qw(now add_timer); use DBI qw(:sql_types); # SQL_BLOB +use PublicInbox::Admin qw(fmt_localtime); sub new { my (undef, $dir, $opt) = @_; @@ -749,7 +749,7 @@ sub eidxq_lock_acquire ($) { return $locked if $locked eq $cur; } my ($pid, $time, $euid, $ident) = split(/-/, $cur, 4); - my $t = strftime('%Y-%m-%d %k:%M %z', localtime($time)); + my $t = fmt_localtime($time); local $self->{current_info} = 'eidxq'; if ($euid == $> && $ident eq host_ident) { kill(0, $pid) and warn <<EOM and return; |