aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/systat/vmstat.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1996-03-31 16:39:26 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1996-03-31 16:39:26 +0000
commitdaab85586ecfbf82406558e7a8eac26f1a100e56 (patch)
tree1f076da7a2069ca392a7867c609c4d8a99a3226e /usr.bin/systat/vmstat.c
parent3cb7c0b1447a8abad5ce339cd8041fa0b8bc88ac (diff)
Notes
Diffstat (limited to 'usr.bin/systat/vmstat.c')
-rw-r--r--usr.bin/systat/vmstat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c
index 77fe9249acf8..bfbde6c95c2b 100644
--- a/usr.bin/systat/vmstat.c
+++ b/usr.bin/systat/vmstat.c
@@ -59,6 +59,7 @@ static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94";
#include <paths.h>
#include <string.h>
#include <stdlib.h>
+#include <time.h>
#include <unistd.h>
#include "systat.h"
#include "extern.h"
@@ -263,9 +264,11 @@ void
fetchkre()
{
time_t now;
+ struct tm *tp;
time(&now);
- strcpy(buf, ctime(&now));
+ tp = localtime(&now);
+ (void) strftime(buf, sizeof(buf), "%c", tp);
buf[16] = '\0';
getinfo(&s, state);
}