Ubuntu Time Format: Switching Between 12-Hour and 24-Hour Clock Notation
How Ubuntu's 12-hour and 24-hour time formats work, what changing them affects, and when a different notation is the better choice for sharing and readability.
Ubuntu can show the time in 12-hour notation with AM/PM or in 24-hour notation. Switching between them is a change to how the time is displayed. It is not a change to the time itself. This review covers which settings control the format, what each one changes, and how the result holds up when times are copied, shared or read aloud by assistive technology.
Evidence note: no release-specific test results were supplied for this article. The guidance below relies on general, documented behavior of the GNOME desktop and the Linux locale system. Menu labels and default values can differ between Ubuntu releases, so check them on your own system.
Is the 24-hour format suitable for your use?
For most people who work across time zones, read logs, schedule tasks or share timestamps internationally, 24-hour notation is the practical choice. Every hour of the day has exactly one written form, so there is no AM/PM marker to drop or misread.
The main tradeoff is familiarity. In the US, many readers expect 12-hour times. A message, screenshot or document aimed at a general US audience can be easier to read in AM/PM form.
When the audience is mixed or the exact moment matters, a full, unambiguous timestamp is the better option. Examples include incident reports, bug tickets and data files. ISO 8601 with a time zone offset works well and can be produced on demand. You do not need to change your desktop setting to use it.
What changing the time format actually changes
The system clock keeps time independently of how it is displayed. Changing the format changes only the presentation layer, meaning the characters an application generates when it turns that stored time into text. The time zone is a separate setting. Switching to 24-hour notation does not shift any times, and neither does switching back.
There is no character reversal, mirroring or font substitution involved. In this context, "format" means notation, not typeface. The digits and separators are ordinary text. A 24-hour time such as 14:30 and its 12-hour equivalent, 2:30 PM, are different strings that describe the same moment.
Ubuntu has two independent places that influence time notation. People who change one often expect it to affect everything.
| Setting | Where it applies | How it is changed |
| GNOME clock format | The top bar clock and other GNOME Shell surfaces | The Date & Time panel in Settings, or the clock-format key via gsettings |
| LC_TIME locale category | Command-line tools and applications that format times through the system locale | localectl, update-locale, or the region/formats option in Settings |
Changing the desktop clock
In Settings, open the Date & Time panel and set Time Format to 24-hour or AM/PM. The location of that panel has moved between releases. In recent versions it sits under the System section. The same preference can be set from a terminal:
gsettings set org.gnome.desktop.interface clock-format '24h'
# revert to AM/PM
gsettings set org.gnome.desktop.interface clock-format '12h'
# check the current value
gsettings get org.gnome.desktop.interface clock-format
This setting is per user. It applies to the GNOME desktop and does not alter terminal output.
Changing the locale's time notation
Programs that format times through the C library use the LC_TIME locale category. This includes the default output of the date command. Some English locales, such as en_US, may default to 12-hour notation. Others, such as en_GB, use 24-hour notation. The exact default can vary with the C library version, so inspect it rather than assuming:
locale | grep LC_TIME
date
locale -k t_fmt
To switch only the time and date notation while keeping the rest of the locale unchanged, generate a locale that uses 24-hour time. Then assign it to LC_TIME and log out and back in:
sudo locale-gen en_GB.UTF-8
sudo localectl set-locale LC_TIME=en_GB.UTF-8
Be aware that LC_TIME also affects date order and day and month names. For example, choosing en_GB typically produces day-month ordering in addition to 24-hour time. If you only want a 24-hour time in one command or script, an explicit format string avoids changing the locale at all:
date +%H:%M # 24-hour, e.g. 14:30
date '+%I:%M %p' # 12-hour with AM/PM
date -Iseconds # ISO 8601 with offset
Applications such as browsers, office suites and mail clients may follow the system locale, the GNOME setting, or their own preferences. Where a program's time notation does not change, look for a language or regional format option inside that program. Behavior for specific applications was not tested for this article.
Will times stay readable after copying or sharing?
Because the result is plain text, a copied time pastes as the same characters. No special glyphs are involved, so there are no rendering or font-compatibility concerns. Search and editing work as they do for any other text.
Ambiguity is the real usability risk, and it comes from context. A time copied from a 12-hour display without its AM/PM marker loses information. A time copied without a date or time zone may be misread by someone in another region. The display format setting cannot fix either problem. When a timestamp leaves your machine, include the date and offset, or use ISO 8601.
Mixing notations creates its own friction. If your desktop shows 24-hour time but a shared document or chat uses AM/PM, readers have to convert. For anything others will act on, pick one notation per document and state the time zone.
Some tools ignore the setting entirely. Cron schedules use 24-hour hour fields regardless of the desktop format. Many log formats have their own fixed timestamp layout. Changing the clock format does not make these consistent with each other, and it does not need to.
Accessibility
Screen readers read the time text they are given, so both notations reach assistive technology as normal characters. How a particular screen reader, such as Orca, pronounces strings like 14:30 or 2:30 PM depends on its speech settings and synthesizer. That pronunciation was not verified for this article. Users who rely on speech output should check both formats and keep the one that is announced more clearly.
Bottom line
- Switching to 24-hour time in Ubuntu is a safe, reversible display change. Stored time and the time zone are untouched.
- The GNOME clock setting and the LC_TIME locale are separate. Change the one that matches where you see the time, or both.
- Use 12-hour notation when the audience expects it, and use full ISO 8601 timestamps when precision matters more than familiarity.
- This article did not verify release-specific menu paths, application behavior or screen reader pronunciation. Confirm these on your own system.