I'm using Ubuntu 20.04 LTS. I want date and time in GNOME Shell's top bar to have the following format:
Sun Jun 13 07:26AM IST 2021
instead of the current:
Jun 13 12:53 PM
How can I achieve this?
I'm using Ubuntu 20.04 LTS. I want date and time in GNOME Shell's top bar to have the following format:
Sun Jun 13 07:26AM IST 2021
instead of the current:
Jun 13 12:53 PM
How can I achieve this?
There are several extensions in the GNOME Shell Extensions website, but most of them are not actively supported anymore. I'm suggesting you to use the Panel Date Format extension, which works fine on Ubuntu 20.04 and is still maintained.
To customize your clock after installing the extension, follow these steps:
Open Extensions, find the Panel Date Format extension in the list and click the gear icon next to it.
You will be presented with this Preferences menu (image from the extension's GitHub repository):
In the Format textbox enter the following to get the time format you want:
%a %e %b %I:%M%p %Z %Y
You can find more info about the date time format syntax here (link also mentioned in the extension's preferences).
Restart GNOME Shell to ensure that the setting is applied by pressing Alt+F2, entering r
and pressing Enter.
Your panel's clock should now have the appearance you want!
The Panel Date Format by atareao extension mentioned in my other answer supports, at the time of writing this answer, GNOME versions up to 44 (Ubuntu versions up to 23.04). If you want to format the date and time using GNOME 45, you can use the Panel Date Format by KEIII extension instead (the extensions unfortunately have the same names so I used the names of their authors to differentiate between them).
After installing this extension, you can customize the date and time on the panel the way you want by running this command:
dconf write /org/gnome/shell/extensions/panel-date-format/format "'%a %b %m %I:%M%p %Z %Y'"
This extension does not have any preferences, but the time and date customization using the above command is straightforward: just put the format specifiers you want inside "'...'"
. The extension supports the format specifiers found here: https://docs.gtk.org/glib/method.DateTime.format.html
*at the time of writing