Fixes AM/PM displayed incorrectly for 12:00 - 12:59 - tty-clock - port of tty-clock to OpenBSD, with pledge/unveil added as goodie.
(HTM) git clone https://git.drkhsh.at/tty-clock.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit f2a79ca51f81112ccaac2fda3a7c4f2cb5f3a39e
(DIR) parent 0cec6b099385d0db33fe81ae3d0d34e15ed40430
(HTM) Author: Sanchith Hegde <sanchith.hegde01@gmail.com>
Date: Fri, 6 Sep 2019 19:28:59 +0530
Fixes AM/PM displayed incorrectly for 12:00 - 12:59
Diffstat:
M ttyclock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/ttyclock.c b/ttyclock.c
@@ -187,7 +187,7 @@ update_hour(void)
ihour = ttyclock.tm->tm_hour;
if(ttyclock.option.twelve)
- ttyclock.meridiem = ((ihour > 12) ? PMSIGN : AMSIGN);
+ ttyclock.meridiem = ((ihour >= 12) ? PMSIGN : AMSIGN);
else
ttyclock.meridiem = "\0";