Bug 110903 - when using uptime or w commands, time is in 24 hour format as opposed to 12 hour
when using uptime or w commands, time is in 24 hour format as opposed to 12 hour
Status: CLOSED RAWHIDE
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: procps (Show other bugs)
3.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-25 08:44 EST by AJ
Modified: 2007-11-30 17:06 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-03-26 06:40:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description AJ 2003-11-25 08:44:31 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5a)
Gecko/20030728 Mozilla Firebird/0.6.1

Description of problem:
No X Windows is installed.
When using command line tools, such as w and uptime, the system time
is displayed in a 24 hour clock, as opposed to a 12 hour clock AM/PM.
I cannot find any way to changes this.

Version-Release number of selected component (if applicable):
procps-2.0.13-9.2E

How reproducible:
Always

Steps to Reproduce:
1. run the w or uptime command
2.
3.
    

Actual Results:   09:46:10  up 46 min,  1 user,  load average: 0.02,
0.01, 0.00

In this case, it is not after 12, so it appears normal, but still
there is no AM stamp as in previous verison.

Expected Results:  Time should have been displayed in 12 hour format
with either AM or PM following

Additional info:

This is new to version 3 of RHES, I also noticed this in RH 9 and
Fedora Core.
Comment 1 Alexander Larsson 2003-11-25 12:44:49 EST
I don't understand this report.
The time given by "uptime" is the amount of time elapsed since the
machine booted, it is neither am nor pm, its just a count of hours.

w however, does have a daytime field, the login time, but this field
*does* have an am/pm stamp.
Comment 2 Alexander Larsson 2003-11-25 13:04:35 EST
Ah, I see uptime also prints the current time.
I dunno why that changed format.
Comment 3 Alexander Larsson 2003-11-25 13:07:50 EST
Changelog entry seems to be:
revision 1.6
date: 2002/09/30 16:52:24;  author: riel;  state: Exp;  lines: +2 -3
remove some cruft (from debian cvs)
Comment 4 Alexander Larsson 2003-11-25 13:09:37 EST
rik, do you know why this changed?
Comment 5 Rik van Riel 2003-11-25 14:16:45 EST
Not sure, but the 12 hour time has always been seen as backwards and
crufty by users from all over the world, so I didn't mind copying this
cleanup from albert cahalan's procps.

I guess the date/time format should be dependant on the locale people
have set ?
Comment 6 Alexander Larsson 2003-11-26 02:07:44 EST
yeah, i think you're supposed to use strftime(), with the %X formating
option.
Comment 7 AJ 2003-12-30 15:14:59 EST
Anything new with this?
Comment 8 Alexander Larsson 2004-02-05 05:38:50 EST
Mass reassign to new owner
Comment 9 Alexander Larsson 2004-02-05 05:39:20 EST
Mass reassign to new owner
Comment 10 Alexander Larsson 2004-02-05 05:43:09 EST
Mass reassign to new owner
Comment 11 Daniel Walsh 2004-03-26 06:40:09 EST
Fixed procps 3.1.15

Note You need to log in before you can comment on or make changes to this bug.