summaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-09-24 19:37:34 +0000
committeremaste <emaste@FreeBSD.org>2015-09-24 19:37:34 +0000
commit24a085ff5beb55c5157714c209f6196f5275c649 (patch)
treec5a1e6af7fedbcffe7a262dcb4fc66a12ae0f6c3 /games
parent4521ad4bf5524ea1b55dd531bdbcaba18c818010 (diff)
downloadFreeBSD-src-24a085ff5beb55c5157714c209f6196f5275c649.zip
FreeBSD-src-24a085ff5beb55c5157714c209f6196f5275c649.tar.gz
MFC r283929: Correct grdc(1) 12-hour display between 12:00 and 13:00
PM starts at 12:00, not 13:00. PR: 194291, 200133 Submitted by: Nick Price
Diffstat (limited to 'games')
-rw-r--r--games/grdc/grdc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/games/grdc/grdc.c b/games/grdc/grdc.c
index 4632c79..04cc00b 100644
--- a/games/grdc/grdc.c
+++ b/games/grdc/grdc.c
@@ -150,14 +150,14 @@ main(int argc, char *argv[])
set(tm->tm_min/10, 14);
if (t12) {
- if (tm->tm_hour > 12) {
- tm->tm_hour -= 12;
- mvaddstr(YBASE + 5, XBASE + 52, "PM");
- } else {
+ if (tm->tm_hour < 12) {
if (tm->tm_hour == 0)
tm->tm_hour = 12;
-
mvaddstr(YBASE + 5, XBASE + 52, "AM");
+ } else {
+ if (tm->tm_hour > 12)
+ tm->tm_hour -= 12;
+ mvaddstr(YBASE + 5, XBASE + 52, "PM");
}
}
OpenPOWER on IntegriCloud