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
This commit is contained in:
Daniel O'Callaghan 1998-04-01 21:34:10 +00:00
parent 5758c2de94
commit 5c1bad3122
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=34993

View file

@ -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,