I have installed Ubuntu 18.04 and I have the following issue:

I tried to change the date on the top panel to 12h format instead of the default 24h format but I found no editable option into settings or gnome-tweaks tool.

I hope to find help here.

  • 2
    Settings > Date & Time > 24 hrs or am/pm. cli: gsettings set org.gnome.desktop.interface clock-format '12h' -should be a dupe of something. – Jacob Vlijm May 22 '18 at 8:45
  • It works via cli and there's no data & time option in 18.04, add it in an answer so anyone can find help throw the question. – AboElnouR May 22 '18 at 8:50
  • To my surprise, I found no literal dupe with a working answer quickly. I'll leave the GUI option, since it is present on my Ubuntu Budgie 18.04 – Jacob Vlijm May 22 '18 at 9:04
  • Yes, you're right. I found that I had something wrong with that installation and I had many things missed (including this issue), so I reinstalled my ubuntu and everything works fine. – AboElnouR Oct 26 '19 at 19:56

There are several ways:

  1. From GUI (Settings):

    Open Settings >Details> Date & Time. Then pick either 24 hrs or am/pm

  2. From GUI (using dconf-editor)

    Open dconf Editor (not installed by default, run

    sudo apt install dconf-editor

    to install), and browse to org > gnome > desktop > interface > clock-format, and change the format to '12h'

    enter image description here

  3. From command line:

    Run the command:

    gsettings set org.gnome.desktop.interface clock-format '12h'   

    To revert:

    gsettings set org.gnome.desktop.interface clock-format '24h'
  • I found another solution using dconf can I edit your answer and add it? – AboElnouR May 22 '18 at 9:32
  • @AboElnouR OK, can't find it quickly, but gsettings is the cli frontend to dconf. gsettings is usually slightly slower, higher level, but includes a consistency check to the dconf database. – Jacob Vlijm May 22 '18 at 9:38
  • I just wanted to provide another solution to those who may not understand this command, But it's Ok. – AboElnouR May 22 '18 at 9:45
  • 1
    Yes, That's exactly what I mean. – AboElnouR May 22 '18 at 10:02
  • 1
    @AboElnouR right! added. – Jacob Vlijm May 22 '18 at 10:03

To run the following commands, first install the dconf-editor package:

sudo apt install dconf-editor

Then run this command, to switch to 12-hour mode:

gsettings set org.gnome.desktop.interface clock-format '12h'   

If you ever want to revert to 24-hour mode, you can do so by running:

gsettings set org.gnome.desktop.interface clock-format '24h'

Right click on the date and time located in the panel.

Change the capital R to lower-case r.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.