From 30e124667101f459493bf11fba5cc7df5258c350 Mon Sep 17 00:00:00 2001 From: deraadt Date: Wed, 4 Sep 1996 23:43:57 +0000 Subject: [PATCH] get 12am & 12pm correct; netbsd pr#2734, khym@bga.com [this was hell to test] --- usr.bin/rup/rup.c | 7 ++++--- 1 file 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 @@ -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'); -- 2.20.1