| author | Augustin Cavalier <waddlesplash@gmail.com> | 2025-12-04 16:41:45.0 -05:00:00 |
|---|---|---|
| committer | Augustin Cavalier <waddlesplash@gmail.com> | 2025-12-04 16:41:45.0 -05:00:00 |
| commit | 3b66de32f47f31ad66891eab9c91daf17410f3eb [patch] |
|
| tree | a3c464637ed75109301b1b6d9e403c8f1e777c92 |
|
| parent | 984dfdee36993a681db6b0d6258c8d517ee23b8f |
|
| download | 3b66de32f47f31ad66891eab9c91daf17410f3eb.tar.gz |
|
libroot/strftime: Add support for %k and %l.
These aren't in POSIX but glibc and FreeBSD support them, and our ICUTimeData class expects that strftime will handle them. Fixes #18471 and some of the problems described in #14356.
Diff
src/system/libroot/posix/musl/time/strftime.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/system/libroot/posix/musl/time/strftime.c b/src/system/libroot/posix/musl/time/strftime.c index 87c2ca5..5bf777f 100644 --- a/src/system/libroot/posix/musl/time/strftime.c +++ b/src/system/libroot/posix/musl/time/strftime.c @@ -95,9 +95,19 @@ if (f=='g') val %= 100; else width = 4; goto number; #ifdef __HAIKU__ case 'k': def_pad = '_'; // fallthrough #endif case 'H': val = tm->tm_hour; goto number; #ifdef __HAIKU__ case 'l': def_pad = '_'; // fallthrough #endif case 'I': val = tm->tm_hour; if (!val) val = 12;