diff options
Diffstat (limited to 'bin/ps/print.c')
-rw-r--r-- | bin/ps/print.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/ps/print.c b/bin/ps/print.c index 37d03a3..f73c3f0 100644 --- a/bin/ps/print.c +++ b/bin/ps/print.c @@ -51,6 +51,7 @@ static const char rcsid[] = #include <vm/vm.h> #include <err.h> +#include <langinfo.h> #include <locale.h> #include <math.h> #include <nlist.h> @@ -354,6 +355,7 @@ started(k, ve) time_t then; struct tm *tp; char buf[100]; + static int use_ampm = -1; v = ve->var; if (!k->ki_valid) { @@ -361,6 +363,9 @@ started(k, ve) return; } + if (use_ampm < 0) + use_ampm = (*nl_langinfo(T_FMT_AMPM) != '\0'); + then = k->ki_p->ki_start.tv_sec; tp = localtime(&then); if (!now) |