Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jun 2009 22:42:31 +1000
From:      Edwin Groothuis <edwin@mavetju.org>
To:        freebsd-i18n@freebsd.org
Subject:   AM/PM or 24 hour in ps
Message-ID:  <20090627124230.GA8587@mavetju.org>

next in thread | raw e-mail | index | archive | help
Hi,

One of the things I would like to see in ps(1) before I die (note
that it might take a long time before this happens) is that the
time started is working in the 24 hour format, were convinient for
the local settings.

The current implementation of ps(1) has already this in it, except
that it doesn't work because we have the format X_FMT_AMPM set for
every locale and thus ps(1) displays it in the AM/PM format.

So, the question is more or less.... How can a program figure out
if the current locale prefers AM/PM notation or the 24 hour notation?



USER    PID %CPU %MEM   VSZ   RSS  TT  STAT STARTED      TIME COMMAND
edwin  1138  0.0  0.3  4408  2112  v0  I+    9:10PM   0:00.01 -bash (bash)
edwin  1145  0.0  0.2  3476  1448  v0  I+    9:10PM   0:00.00 /bin/sh /usr/loca

vs

USER    PID %CPU %MEM   VSZ   RSS  TT  STAT STARTED      TIME COMMAND
edwin  1138  0.0  0.3  4408  2112  v0  I+   21:10     0:00.01 -bash (bash)
edwin  1145  0.0  0.2  3476  1448  v0  I+   21:10     0:00.00 /bin/sh /usr/loca


Edwin

-- 
Edwin Groothuis		Website: http://www.mavetju.org/
edwin@mavetju.org	Weblog:  http://www.mavetju.org/weblog/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090627124230.GA8587>