How can I change the date and time format in GNOME Shell's top bar?

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

current date and time format

How can I achieve this?


Solution 1:

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.

  • Read this question about how to install GNOME Shell extensions: How do I install and manage GNOME Shell extensions?

To customize your clock after installing the extension, follow these steps:

  1. Open Extensions, find the Panel Date Format extension in the list and click the gear icon next to it.

  2. You will be presented with this Preferences menu (image from the extension's GitHub repository):

    preferences menu

  3. 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).

  4. 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!