Bug 36786

Summary: make ps(1) use 24-hour time by default
Product: Base System Reporter: Michael Wardle <michael>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me CC: freebsd
Priority: Normal    
Version: 4.5-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Lots of locale sets the T_FMT_AMPM string none

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 freebsd_triage 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

Hey,

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

Do
- Set Status to "Open"