hwclock prints time in wrong format (is locale ignored?)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
util-linux (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
Binary package hint: util-linux
Ubuntu 8.04; Ubuntu 9.10; Fedora 12; CentOS 5.3; ArchLinux, etc
I think that hwclock ignores locales and prints time in its own format. Compare output from hwclock and date:
$ date; hwclock
Sun Dec 20 13:59:53 CET 2009
Sun 20 Dec 2009 01:59:54 PM CET -0.469439 seconds
From my point of view, correct output should be similar from both commands, like this:
$ date; hwclock
Sun Dec 20 13:59:53 CET 2009
Sun Dec 20 13:59:53 CET 2009 -0.469439 seconds
One more example, I set TZ in this case:
$ export TZ=UTC
$ date; hwclock
Sun Dec 20 13:02:12 UTC 2009
Sun 20 Dec 2009 01:02:13 PM UTC -0.406637 seconds
Why "PM" is printed in hwclock output and why output is in 12h format and not in 24h format?
I am in CZ, my timezone is set to Europe/Prague, we use 24h time format here.
Changed in util-linux (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Low |
status: | Confirmed → Triaged |
I noticed that I see the same format used by hwclock at different place too. When I try to login with bad password to my Ubuntu box, I see at next successful login message like this:
1 failure since last login
Last was Sun 20 Dec 2009 03:21:04 PM CET on tty1
Time format in this login report is the same as reported by hwclock; 12h format at system that uses 24h format. Is this correct? I think I would like to see this:
Last was Sun 20 Dec 2009 15:21:04 CET on tty1