diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 1996-03-31 16:39:26 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 1996-03-31 16:39:26 +0000 |
| commit | daab85586ecfbf82406558e7a8eac26f1a100e56 (patch) | |
| tree | 1f076da7a2069ca392a7867c609c4d8a99a3226e /usr.bin/systat/vmstat.c | |
| parent | 3cb7c0b1447a8abad5ce339cd8041fa0b8bc88ac (diff) | |
Notes
Diffstat (limited to 'usr.bin/systat/vmstat.c')
| -rw-r--r-- | usr.bin/systat/vmstat.c | 5 |
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); } |
