Ubuntu Linux

How to Change Time Format in Ubuntu: 12h or 24h

Richard
Written by
Richard
Jan 19, 2023 Updated Apr 18, 2026 3 min read
How to Change Time Format in Ubuntu: 12h or 24h

This guide explains how to switch your system clock between 12-hour and 24-hour formats in Ubuntu Linux. By default, Ubuntu often uses the 24-hour “military” format. If you prefer the 12-hour format with AM/PM, you can easily change it.

Why change the time format? You might prefer a 12-hour clock because it is what you use in your daily life, or you may need 24-hour time for work or travel.

What happens when done? Your clock in the top bar will update immediately to reflect your chosen style. This change usually carries over to other apps on your system.

Quick Settings Menu

Modern versions of Ubuntu include a “Quick Settings” menu. This is the fastest way to access your clock settings. Click the group of icons in the top-right corner of your screen (where the volume and battery icons are). You can often click directly on the time or the gear icon to jump straight into your configuration options.

Change system time format using the Settings app

Ubuntu has a central place for most settings. To open it, click the Activities button or press the Super key, then type Settings.

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

Alternatively, click the Quick Settings menu at the top-right and select the gear icon.

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

In the Settings sidebar, scroll down and click on System, then select Date & Time.

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

Look for the Time Format section. Click the drop-down menu to choose between 24-hour or AM/PM.

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

Your choice takes effect instantly.

Change system time format using the command terminal console

You can also use the terminal to change your clock settings. Note: These commands are specific to the GNOME desktop environment, which is the default for Ubuntu.

Open the terminal by pressing CTRL + ALT + T.

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

To set the clock to a 12-hour format, type this command and press Enter:

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

To switch back to a 24-hour format, type this command and press Enter:

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

Change system time format using the Dconf Editor

If you prefer a visual tool for advanced settings, you can use the Dconf Editor. If you use Windows, this is similar to Windows Registry Editor.

Disclaimer: Dconf Editor is an advanced tool that allows you to change low-level system settings. It is not recommended for basic users as incorrect changes can affect your system stability.

You must install this tool first. Learn how to install software here: How to add or remove software on Ubuntu Linux.

ubuntu linux decon editor install
Ubuntu Linux decon editor install

After launching Dconf Editor, navigate to this path:

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

Turn off the “Use default value” switch. Then, enter either ’12h’ or ’24h’ into the Custom value input field to apply your preference.

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

Conclusion

You now know how to toggle your time display using the Settings app, the terminal, or the Dconf Editor. Choose the method that feels most comfortable for you.

Was this guide helpful?

Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, the owner and lead writer at Geek Rewind, is a tech enthusiast passionate about simplifying complex IT topics. His years of hands-on experience in system administration and enterprise IT operations have honed his ability to provide practical insights and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

2456 articles → Twitter

📚 Related Tutorials

How to Add Weather Info to Ubuntu Top Menu Bar
Ubuntu Linux How to Add Weather Info to Ubuntu Top Menu Bar
How to Show Weekday on Ubuntu Top Menu Bar
Ubuntu Linux How to Show Weekday on Ubuntu Top Menu Bar
How to Display Seconds on Ubuntu Top Menu Clock
Ubuntu Linux How to Display Seconds on Ubuntu Top Menu Clock
How to Turn On or Off Set Time Automatically in Windows 11
Windows How to Turn On or Off Set Time Automatically in Windows 11

One response to “How to Change Time Format in Ubuntu: 12h or 24h”

Leave a Reply

Your email address will not be published. Required fields are marked *