xclock does not give 24hr format

I run a simple system with X and fvwm (ie no gnome or KDE) and I had a need for a digital clock to be displayed and continuously (every second) updated. I found xclock which seemed to promise sufficient capabilites but I cannot get a digital 24hr clock.

I tried “xclock -d -update 1 -twentyfour” but it showed me that it was 05:57 PM BST when I wanted 17:57. I tried various parameters but it did not do what the man page says.

I would be happier with a clearer display but why no 24hr clock?


xclock -digital -strftime %H:%M:%S

However, I agree that “-twentyfour” does not work the way that it should.

For me “-twelve” is ignored and I always get a 24 hour output unless I use e.g.

xclock -digital -strftime %l:%M:%S%p -update 1