Bug 110903 - when using uptime or w commands, time is in 24 hour format as opposed to 12 hour
Summary: when using uptime or w commands, time is in 24 hour format as opposed to 12 hour
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: procps
Version: 3.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-11-25 13:44 UTC by AJ
Modified: 2007-11-30 22:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-03-26 11:40:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description AJ 2003-11-25 13:44:31 UTC
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 17:44:49 UTC
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 18:04:35 UTC
Ah, I see uptime also prints the current time.
I dunno why that changed format.


Comment 3 Alexander Larsson 2003-11-25 18:07:50 UTC
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 18:09:37 UTC
rik, do you know why this changed?


Comment 5 Rik van Riel 2003-11-25 19:16:45 UTC
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 07:07:44 UTC
yeah, i think you're supposed to use strftime(), with the %X formating
option.

Comment 7 AJ 2003-12-30 20:14:59 UTC
Anything new with this?

Comment 8 Alexander Larsson 2004-02-05 10:38:50 UTC
Mass reassign to new owner

Comment 9 Alexander Larsson 2004-02-05 10:39:20 UTC
Mass reassign to new owner

Comment 10 Alexander Larsson 2004-02-05 10:43:09 UTC
Mass reassign to new owner

Comment 11 Daniel Walsh 2004-03-26 11:40:09 UTC
Fixed procps 3.1.15


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