Results 1 to 4 of 4

Thread: Openbox Ubuntu 12 hour time

  1. #1
    Join Date
    Oct 2021
    Beans
    1

    Openbox Ubuntu 12 hour time

    Hi,

    I have a question that I am hoping that someone may be able to help me with. I am running Ubuntu 20.04 with Openbox. I am in the USA and the locale seems to be set to en_US on this machine. However, when I execute a ls-la command, or attach a file in Thunderbird, or open a file in LibreOffice, all of the timestamps are in 24-hour time.

    Is there anything that I can do to make these appear in 12-hour time (am/pm)?

    Thank you for any help that you can provide.

  2. #2
    Join Date
    Oct 2018
    Beans
    91

    Re: Openbox Ubuntu 12 hour time

    Hello catipads. I use Lubuntu, and I can right click on the clock in the sys tray, choose the configure option. From there I can set to 12/24 hour time, whether to show date and format for that, etc. Hope this helps.
    I'm a firm believer that the only stupid question is the one you don't ask.
    Lenovo ideapad320-15iap, 1.1G Intel processor with onboard graphics, x64, 1TB SSD, 8GB ram
    lubuntu 20.04.2

  3. #3
    Join Date
    May 2010
    Beans
    1,865

    Re: Openbox Ubuntu 12 hour time

    The terminal is not affected by the WM/DE you use. It's the terminal. Which terminal application are you using and which shell please? (If you are unsure of the shell it's probably BASH).

  4. #4
    Join Date
    Dec 2014
    Beans
    1,868

    Re: Openbox Ubuntu 12 hour time

    The time stamps for files are stored in a locale independent way (seconds since 1.1.1970, 0:00:00 UTC). How a program displays that time is up to the program. I don't know about Thunderbird or LibreOffice, but 'ls' has an option '--time-style' which will accept the same format codes as 'date'. So to get the time format for your locale you'd use 'ls -la --time-style=+%c'. If that still doesn't give you a twelve hour time format, you could try 'ls -la --time-style="+%a, %B %d %Y %r %p"'. If that works the way you want, you might set an alias for it in ~/.bashrc.

    Holger

Bookmarks

Posting Permissions

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