summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-09-04 23:43:58 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-09-04 23:43:58 +0000
commit622f87d7b9b65aa5038aae99fcb1bad2abfdbffc (patch)
treecc46f384d59ca6f8d67e2b3872d3592f881426fa /usr.bin
parentc16bf4a0396a8172d77e060332139043e4035240 (diff)
get 12am & 12pm correct; netbsd pr#2734, khym@bga.com [this was hell to test]
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/rup/rup.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/rup/rup.c b/usr.bin/rup/rup.c
index 066f71a40de..ac29d9849f2 100644
--- a/usr.bin/rup/rup.c
+++ b/usr.bin/rup/rup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rup.c,v 1.3 1996/08/16 09:10:29 deraadt Exp $ */
+/* $OpenBSD: rup.c,v 1.4 1996/09/04 23:43:57 deraadt Exp $ */
/*-
* Copyright (c) 1993, John Brezak
@@ -34,7 +34,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: rup.c,v 1.3 1996/08/16 09:10:29 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: rup.c,v 1.4 1996/09/04 23:43:57 deraadt Exp $";
#endif /* not lint */
#include <stdio.h>
@@ -216,7 +216,8 @@ print_rup_data(host, host_stat)
hours_buf[0] = '\0';
if (printtime)
- printf(" %2d:%02d%cm", host_time.tm_hour % 12,
+ printf(" %2d:%02d%cm",
+ (host_time.tm_hour % 12) ? (host_time.tm_hour % 12) : 12,
host_time.tm_min,
(host_time.tm_hour >= 12) ? 'p' : 'a');