summaryrefslogtreecommitdiffstats
path: root/usr.bin/rup
diff options
context:
space:
mode:
authordanny <danny@FreeBSD.org>1998-04-01 21:34:10 +0000
committerdanny <danny@FreeBSD.org>1998-04-01 21:34:10 +0000
commit4fb6c831df358d42b72a4271645cc1b96dc5f319 (patch)
treea86659e6faab92ce2a87e07d4b77b1140b7f5f4d /usr.bin/rup
parent028480bfb1299a0a34ad19f20e2cc3f24b402235 (diff)
downloadFreeBSD-src-4fb6c831df358d42b72a4271645cc1b96dc5f319.zip
FreeBSD-src-4fb6c831df358d42b72a4271645cc1b96dc5f319.tar.gz
PR: bin/6193
Submitted by: Max Euston <meuston@jmrodgers.com> Make times between 0000-0059 and 1200-1259 show as 12:xx, not 0:xx
Diffstat (limited to 'usr.bin/rup')
-rw-r--r--usr.bin/rup/rup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/rup/rup.c b/usr.bin/rup/rup.c
index e0b1de2..89b6ffb 100644
--- a/usr.bin/rup/rup.c
+++ b/usr.bin/rup/rup.c
@@ -33,7 +33,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id: rup.c,v 1.8 1997/08/07 06:50:02 charnier Exp $";
+ "$Id: rup.c,v 1.9 1997/09/15 09:46:42 jkh Exp $";
#endif /* not lint */
#include <err.h>
@@ -137,7 +137,7 @@ rstat_reply(char *replyp, struct sockaddr_in *raddrp)
hours_buf[0] = '\0';
printf(" %2d:%02d%cm up %9.9s%9.9s load average: %.2f %.2f %.2f\n",
- host_time.tm_hour % 12,
+ (host_time.tm_hour % 12) ? host_time.tm_hour % 12 : 12,
host_time.tm_min,
(host_time.tm_hour >= 12) ? 'p' : 'a',
days_buf,
OpenPOWER on IntegriCloud