summaryrefslogtreecommitdiffstats
path: root/usr.bin/rup
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-09-04 23:43:57 +0000
committerderaadt <deraadt@openbsd.org>1996-09-04 23:43:57 +0000
commit30e124667101f459493bf11fba5cc7df5258c350 (patch)
tree126b98960529d594364038d2c6565c62662e2ad1 /usr.bin/rup
parentpermit YP to be compiled out using flag in bsd.own.mk; pr#15, peter@demon.net (diff)
downloadwireguard-openbsd-30e124667101f459493bf11fba5cc7df5258c350.tar.xz
wireguard-openbsd-30e124667101f459493bf11fba5cc7df5258c350.zip
get 12am & 12pm correct; netbsd pr#2734, khym@bga.com [this was hell to test]
Diffstat (limited to 'usr.bin/rup')
-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');