From e3444977887f7615cef271341f29f3a87a36eac9 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 13 Dec 2023 00:50:11 +0000 Subject: treewide: avoid strftime %k for portability 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. --- xt/msgtime_cmp.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xt') diff --git a/xt/msgtime_cmp.t b/xt/msgtime_cmp.t index a7ef5245..c63f785e 100644 --- a/xt/msgtime_cmp.t +++ b/xt/msgtime_cmp.t @@ -36,7 +36,7 @@ sub quiet_is_deeply ($$$$$) { ($old->[0] != $cur->[0]) || ($old->[1] != $cur->[1]))) { for ($cur, $old) { - $_->[2] = strftime('%Y-%m-%d %k:%M:%S', gmtime($_->[0])) + $_->[2] = strftime('%F %T', gmtime($_->[0])) } is_deeply($cur, $old, "$func $oid"); diag('got: ', explain($cur)); -- cgit v1.2.3-24-ge0c7