How to Change Time (Clock) Format on Ubuntu Linux

This article explains the steps one can take to change the time (clock) to 12h or 24h format in Ubuntu Linux.

By default, Ubuntu Linux displays the system time in a 24-hour or military time format. If you prefer to read your system clock in a 12-hour time format, continue below to learn how to change that.

Whatever time or clock format you choose, it will appear on the Top bar. It may also appear in applications and documents you create unless you override the format in individual programs.

Choose whether the clock displays 12h or 24h format

As mentioned above, if Ubuntu Linux displays its system clock in a 24-hour format and you want to change it to a 12-hour format, the steps below show you how.

Ubuntu Linux has a centralized location for the majority of its settings. From system configurations to creating new users and updating, all can be done from the System Settings panel.

To get to System Settings, open the Activities overview and start typing Settings.

ubuntu linux activities overview search box
ubuntu Linux activities overview search box

Alternatively, click on the System menu at the top-right corner of the top bar on your desktop.

On the System menu, select Settings as highlighted below.

ubuntu linux system menu settings button
ubuntu Linux system menu settings button

In the Settings app, select Date & Time on the left menu.

Ubuntu Linux date and time pane
Ubuntu Linux date and time pane

On the System Settings -> Date & Time settings panel, next to the Time Format section, use the drop-down option to choose a format:

Ubuntu Linux date and time pane time format options
Ubuntu Linux date and time pane time format options

The option you choose will automatically apply to your desktop.

Change system time format using the command terminal console

Another way to change the system clock or time format is via the command line terminal console.

As with many other Linux distributions, the majority of the system settings changes are done using the command terminal. Most Linux users should be somehow familiar with the command terminal.

First, open the Terminal app in Ubuntu Linux.

You can do that by pressing the Super key (or Windows key) to show the Overview screen. Then use the search box to search for ‘Terminal‘.

Select the Terminal app to launch.

Ubuntu Linux activities overview Terminal search
Ubuntu Linux activities overview Terminal search

Alternatively, press the keyboard shortcut (CTRL + ALT + T) on your keyboard to launch the Terminal app.

When the Terminal app opens, type the commands below to display a 12-hour clock format.

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

To reverse and use a 24-hour clock format, run the commands below.

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

Change system time format using the Dconf Editor

You can also use Dconf Editor to make common system changes if you can’t use the command Terminal app.

If you are familiar with Windows, then you know about Windows Registry Editor.

Ubuntu Linux doesn’t have a registry database to configure hidden system settings. Howerver, Ubuntu Linux uses the Dconf Editor tool to change low-level system configurations and settings.

You can call it a Ubuntu Linux Registry Editor because it provides similar functionality, but without a massive database that is in the Windows system.

To use Dconf Editor, you must first install it since it doesn’t come with Ubuntu Linux.

Read the post below to learn how to install software on Ubuntu Linux.

How to add or remove software on Ubuntu Linux

In the Ubuntu Software app, search for Dconf Editor to install.

ubuntu linux decon editor install
ubuntu Linux decon editor install

After installing and launching the Dconf Editor app, navigate to the path below:

org -> gnome -> desktop -> interface -> clock-format

On the Clock-Format Dconf settings pane, toggle the “Use default value” button to the Off position.

Then use the Custom value option to choose a 12h or 24h time format.

Ubuntu Linux date and time pane time format options via dconf
Ubuntu Linux date and time pane time format options via dconf

That should do it!

Conclusion:

This post showed you how to change the time or clock format on Ubuntu Linux. If you find any error above or have something to add, please use the comment form below.