xclock digital clock 24h format

Asked by Photodeus

I'm using Kubuntu with xclock 1.0.3 installed.
In the man page it says:
-digital or -d
            This option indicates that a 24 hour digital clock should be used.
-twentyfour
               This option indicates that a digital clock should display the time in twenty-four hour format. This is the default when a digital clock is used.

However, using any of these switches do not work. Right now it shows me
Sat 27 Jun 2009 01:25:31 PM CEST
I would much rather have the expected 13:25:31 CEST instead.

the "locale" command in a console says
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_TIME="en_US.UTF-8"
LC_ALL=

Is there a correct way of getting xclock to show time in 24h format without changing locale settings?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu xclock Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Josh Kupershmidt (schmiddy) said :
#1

Looks like a bug in xclock. The option -twentyfour claims:

      -twentyfour
               This option indicates that a digital clock should display the
               time in twenty-four hour format. This is the default when a
               digital clock is used.

but has no effect for me -- I get the same 12-hour format you see.

I have no idea who maintains xclock these days, if anyone does. Barring getting this bug in xclock fixed, I'd suggest using whatever system clock KDE shows. (For gnome, one can right-click the clock in the top-right corner, go to "Preferences" and select "24 hour format" -- I imagine there's something similar for the KDE clock).

Revision history for this message
Josh Kupershmidt (schmiddy) said :
#2

Update: I found a three year-old bug report complaining about this issue:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=352967

I believe that the Xorg folks are responsible for the xclock package. I'm not sure if this is a Debian/Ubuntu-specific problem, or whether it's just a problem with Xorg. I have an old Centos 4.4 machine on which xclock displays correctly.

Revision history for this message
Photodeus (photodeus) said :
#3

Actually I use xclock only when I need to use a more lightweight window manager such as Openbox, in KDE I already have a decent clock.
This bug sounds like an easy problem to solve. Thanks for digging it out. Now we need someone to commit a fix for it in the proper place...

Revision history for this message
Josh Kupershmidt (schmiddy) said :
#4

I actually opened an Ubuntu bug report for this item, see:

https://bugs.launchpad.net/ubuntu/+source/x11-apps/+bug/394430

You can vote "affects me too" and watch the bug status on that page.

Can you help with this problem?

Provide an answer of your own, or ask Photodeus for more information if necessary.

To post a message you must log in.