Bug 36786 - make ps(1) use 24-hour time by default
Summary: make ps(1) use 24-hour time by default
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 4.5-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2002-04-05 14:50 UTC by Michael Wardle
Modified: 2018-05-20 23:51 UTC (History)
1 user (show)

See Also:

Lots of locale sets the T_FMT_AMPM string (540 bytes, patch)
2014-12-07 22:40 UTC, Kristian K. Nielsen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Wardle 2002-04-05 14:50:01 UTC
I noticed that "ps -u" gives the time a process was started in a
12-hour format, regardless of the locale setting.

It seems that the "start" field is designed to always be a fixed width,
so it probably shouldn't merely use the locale date format, as this
may cause variable widths.

In lieu of fixing this to obey the locale, I would suggest this should
be changed to always use a 24-hour time format, as 24-hour time is the
standard format for many locales including en_US and C.
Comment 1 Volker Werth freebsd_committer 2008-05-21 22:33:12 UTC
State Changed
From-To: open->suspended

Mark suspended awaiting patches.
Comment 2 Kristian K. Nielsen 2014-12-07 22:40:33 UTC
Created attachment 150325 [details]
Lots of locale sets the T_FMT_AMPM string


This old issue still exists - it is caused by lots of locales actually provide the "am/pm formatting" string (T_FMT_AMPM) even the locale does not want am/pm.

So the two tools "ps" and "w" which uses this string to check weather to output am/pm fails on lots of locales.

This patch is for the Danish locale - maybe translaters can help fix the rest?
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 23:51:18 UTC
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017

- Set Status to "Open"