aboutsummaryrefslogtreecommitdiff
path: root/games/grdc
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2015-06-02 20:53:17 +0000
committerEd Maste <emaste@FreeBSD.org>2015-06-02 20:53:17 +0000
commit37be506339c3c90ec2045ef5009659cbdff84127 (patch)
tree24cc8715841d47393f7efdf8c8f6262babe1b5f9 /games/grdc
parentb322948ef6131b9847a7a7710ccd31c71821df73 (diff)
downloadsrc-37be506339c3c90ec2045ef5009659cbdff84127.tar.gz
src-37be506339c3c90ec2045ef5009659cbdff84127.zip
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 MFC after: 1 week
Notes
Notes: svn path=/head/; revision=283929
Diffstat (limited to 'games/grdc')
-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 4632c79ca9ff..04cc00b37d6f 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");
}
}