I want to change the date/time format on the top panel to a format close to RFC 3339 / ISO 8601, like one of these:

%F %T → 2013-06-24 16:13:00

%F %a %T → 2013-06-24 Mon 16:13:00

%A %F %T → Monday 2013-06-24 16:13:00

I know Unity has a preference somewhere hidden away in dconf, this is how I did it in Unity, but I can't find such a preference for Gnome 3 shell. Preferably, I'd also like to set one of these as my system-wide date/time locale preference.

  • 1
    possible duplicate of How to configure the clock date format to ISO 8601? – Radu Rădeanu Jun 24 '13 at 15:26
  • 2
    @Radu: Unity shell is not Gnome shell. No, it's not a duplicate of that question. – James Haigh Jun 24 '13 at 15:35
  • Unfortunately, gnome-shell is a synonym of gnome, when in fact it is only a part of Gnome 3 that is replaced by Unity shell in main Ubuntu. – James Haigh Jun 24 '13 at 15:39
  • @edwin: Either which way? I don't even have those 2 keys in my dconf. Maybe you should test it yourself, and if you succeed, post an answer back here. Until then, this question is not a duplicate of that one. As I mentioned in the question, I know it's possible in Unity, I've done it before, using those 2 keys, but this is Gnome shell. Can we move on now? – James Haigh Jun 24 '13 at 16:12
  • 1
    I have been looking here, here, and here. Put so far (at least according to the last 'here') it looks like the API has been modified so the format is inside the C/C++ code. I mean I cannot find anything in the JavaScript API about the WallClock class (which you could use to change the file /usr/share/gnome-shell/js/ui/dateMenu.js). – edwin Jun 24 '13 at 17:19

Open a terminal and set

gsettings set org.gnome.desktop.interface clock-show-date true

YMMW - this did work for me on Fedora 19.

  • 1
    … and Fedora22! – Dirk Feb 7 '16 at 17:07
  • 2
    The question is asking how to change the format of the date displayed (by the clock and in other places), not how to display the date next to the clock. – Harry Cutts Dec 2 '17 at 1:12
  • Cool, but unfortunately not graphical! – MUY Belgium Jun 21 '18 at 15:24
  • Works on Ubuntu 18.04 too – Carlos Alberto Martínez Gadea Dec 7 '18 at 9:21

In addition to what Martin says, the following worked for me on Ubuntu 14.04, where dconf-editor didn't:

gsettings set org.gnome.desktop.interface clock-show-date true
gsettings set org.gnome.desktop.interface clock-show-seconds true
  • 1
    As with Martin's answer, the question is asking how to change the format of the date displayed (by the clock and in other places), not how to display the date next to the clock. – Harry Cutts Dec 2 '17 at 1:12
  • Fair point, additionally I should probably have left this as a comment on Martin's response – seddy Jan 22 '18 at 12:09

I was ultimately able to achieve my exactly desired format using a GNOME extension made by Daniel Khodabakhsh. Thank you Daniel!

I found that here: https://github.com/Daniel-Khodabakhsh/datetime-format

Screenshot: enter image description here

Format: %A | %m-%d-%G | %I:%M %p


You can try one of these three extensions:

  • Full Clock

    enter image description here Replaces the default clock with a complete one showing time, date and week day

  • Full Clock 2

    enter image description here Replaces the default clock with a one showing date, week, day of week and time.

  • Format Clock (development discontinued, but apparently working fine in 3.16)

    enter image description here Change top panel clock format.

    It says the develpmont has been discontinued, but I tested it, manually editing metadata.json to include 3.18, and it works:

    enter image description here

  • I am unable to install any of those because they do not seem to support 3.18 and it doesn't even seem to download them. – user364819 Dec 27 '15 at 20:24
  • @ParanoidPanda Format Clock is on Github (see README for instructions), and you can try bernaerts.dyndns.org/linux/76-gnome/… for the others. – muru Dec 27 '15 at 20:30
  • 1
    And there is no way of changing any settings in dconf-editor or something to do this rather than installing something? – user364819 Dec 27 '15 at 20:37
  • @ParanoidPanda nope. The only settings I can find are for just showing the date there. – muru Dec 27 '15 at 20:37

Partial answer:

Although it doesn't look like the panel clock is easy to format, the calendar menu opened by clicking on it is very easy. Here's a quick hack:

$ sudo vim /usr/share/gnome-shell/js/ui/dateMenu.js

(vim or any other text editor.)

Search for ‘B %d, %Y’, and replace with ‘F’. Save. Press Alt+F2, r, Enter, to restart the shell.

Searching the parent directory reveals a few others that might be worth experimenting with:

$ rgrep -I '%B' /usr/share/gnome-shell/js/ui/

but unfortunately, searching for the abbreviated month name in the panel clock returns nothing here:

$ rgrep -I '%b' /usr/share/gnome-shell/

Any changes to these file will probably be overwritten by updates to Gnome, and you may want to keep the originals of files you edit (sudo mv [name].js [name].js.orig).

  • It's worth doing with calendar.js as well; there are 2 relevant lines in the _showOtherDay function. – James Haigh Jun 24 '13 at 18:57

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.