How to set the clock to 24 hour format on Ubuntu Mate 22.04

I understand your frustration.

Since MATE changed to ayatana indicators you probably discovered that the date/time indicator changed too. It is no longer a gnome(mate) panel gadget but a seperate ayatana indicator so the key changed too ofcourse.

The default setting for 12h/24h for ayatana-datetime-indicator is automatically selected based on your regional settings.
You can still override this by invoking

gsettings set org.ayatana.indicator.datetime time-format  '24-hour'

Try to set this and see if it works.

If it doesn't, create your custom format by setting:

gsettings set org.ayatana.indicator.datetime time-format  'custom'
gsettings set org.ayatana.indicator.datetime custom-time-format '%H:%M'

You can lookup the formatcodes you need (like %H %M %s etc.) by invoking:

man strftime

The alternative is to revert to the old date-time indicator instead, by disabling the ayatana version and right-click the panel and add 'clock'.
This would not be the preferred way but if all else fails it might just save your day.

4 Likes