Clock – How to Change Time Display to 12h Format in Ubuntu

clockgnome-shell

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.

Best Answer

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'
    
Related Question