Allow a localized and/or configurable date format for lstart
The stime/start/bsdstart date fields have some historical idiosyncrasies with their outpout format, mainly being size-efficient and age-dependent. I guess it would be too hard to change their behaviour.
But the 'lstart' field is a plain un-abridged date, altough it's a ctime() and is not user-configurable. I would like to propose to be it optionnaly locale-aware. If for instance a -D <date format>
option would exist, it would allow the ctime() output to be replaced at run-time by a strftime(fmt) one, and users could invoke -D %c
(locale compliant output) or -D %Y-%m-%dT%H:%M:%S
(short ISO).
Both cases have been on demand for a long time on Stack Overflow and are currently only obtained thru pipe+awk kludges.
If that's pertinent, I would like to propose a patch.
Side note : it would be clearer if ps's manpage would specify that LC_TIME is the date format only for the stime field (I scratched my head for a while asking myself why -o lstart
would ignore LC_TIME).
Thanks !