Results 1 to 3 of 3

Thread: xclock does not give 24hr format

  1. #1
    Join Date
    Nov 2008
    Location
    Bath UK
    Posts
    263

    Default 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?

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,786
    Blog Entries
    3

    Default Re: xclock does not give 24hr format

    Try:
    Code:
    xclock -digital -strftime %H:%M:%S
    However, I agree that "-twentyfour" does not work the way that it should.
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  3. #3
    Join Date
    Oct 2008
    Location
    Glasgow, Scotland
    Posts
    1,145

    Default Re: xclock does not give 24hr format

    Quote Originally Posted by nrickert View Post
    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.
    Code:
    xclock -digital -strftime %l:%M:%S%p -update 1
    ~Thank you for sharing an interesting problem.
    --
    slàinte mhath,
    rayH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •