From e8ac422bc8b03c9b2c3735578aab7049092c7c5a Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Tue, 18 Nov 2025 02:24:09 -0500 Subject: With -v, print midnight as 12:00a and noon as 12:00p. --- src/listalf.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/listalf.c b/src/listalf.c index e94b95a..c4cd713 100644 --- a/src/listalf.c +++ b/src/listalf.c @@ -31,10 +31,9 @@ void format_msdos_time(char *buf) { hour = t >> 11; min = (t >> 5) & 0x3f; - /* midnight prints as 12pm, not 12am... but 0:01 (1 min past - midnight) prints as 12:01am */ - if(hour == 0 && min == 0) hour = 24; - + /* midnight is 12:00a (unlike arc, which uses 0:00a). noon + is 12:00p (same as arc). could just use a 24h clock like + unzip does, but AM/PM are more intuitive to me. */ ampm = (hour > 11 ? 'p' : 'a'); hour %= 12; -- cgit v1.2.3