diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 2001-03-21 20:32:20 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 2001-03-21 20:32:20 +0000 |
| commit | 6ab831378a9421c38b61fde49aba85458c7da1e8 (patch) | |
| tree | ae6ccf1c36b0700bc92cb35abd78fb240321c79d /usr.bin/systat/vmstat.c | |
| parent | 9eb8ec95f4c9ee60ae874ff032325cd1a09cf5e0 (diff) | |
Notes
Diffstat (limited to 'usr.bin/systat/vmstat.c')
| -rw-r--r-- | usr.bin/systat/vmstat.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c index beb8e3c7816a..f9bdc17c0099 100644 --- a/usr.bin/systat/vmstat.c +++ b/usr.bin/systat/vmstat.c @@ -58,6 +58,7 @@ static const char rcsid[] = #include <ctype.h> #include <err.h> #include <errno.h> +#include <langinfo.h> #include <nlist.h> #include <paths.h> #include <signal.h> @@ -256,11 +257,15 @@ fetchkre() { time_t now; struct tm *tp; + static int d_first = -1; + + if (d_first < 0) + d_first = (*nl_langinfo(D_MD_ORDER) == 'd'); time(&now); tp = localtime(&now); - (void) strftime(buf, sizeof(buf), "%c", tp); - buf[16] = '\0'; + (void) strftime(buf, sizeof(buf), + d_first ? "%e %b %R" : "%b %e %R", tp); getinfo(&s, state); } |
