By default date and time is displayed by the clock applet on the top right of the gnome desktop in Ubuntu. For me this displays something like "Tue Aug 3, 19:45". I would like to change it to make the date terser and to include e.g., ISO week number - to something like 03/08-19:45-W31.2

Is there anyway I can specify a "format string" for how the date-time is displayed ?

  1. Open gconf-editor by pressing Alt+F2 and typing gconf-editor
  2. Navigate to apps -> panel -> applets.
  3. Look for your applet. In my case it is called applet_3, on another computer its name is clock_0. Maybe a good way is to search (Strg+f or for US keyboards Ctrl+f, activate both fields in the search menu) for ClockApplet (case must match).
  4. Go to prefs. Change the value of format to custom and change custom_format to whatever you like. The syntax comes from strftime().
  5. The format will immediately change if you enter some values.

Note: This option will not work in 10.10's netbook edition, see this question for a solution.

  • WoW! It works. This is awesome. Too good. Thanks qbi for the detailed response.
    – koushik
    Aug 3 '10 at 15:49
  • 3
    1 minor point. The Strg key is the Ctrl key in USA keyboards so Strg+F results in "Find" being invoked.
    – koushik
    Aug 3 '10 at 18:00
  • 1
    Thanks for your comment. I edited my answer and added <kbd>Ctrl</kbd>.
    – qbi
    Aug 3 '10 at 20:17
  • Is it only for me or does the 'Copy Date' function (if you right-click on the Clock-applet) still delivers the default date-format if you edit the shown date-format?
    – Pit
    Jan 27 '11 at 22:08

You might also be interested in looking at some examples other people have done with the same process. See: http://www.omgubuntu.co.uk/2009/11/gnome-panel-clock-themes.html I used the first one and couldn't be happier, but now that you mentioned week number, I need that too.

  • Thanks. Inspiring Indeed. Of course I shd have searched OMG! Ubuntu! first :-). Anyway I made a mod to the first one in that article for including the week number & day ([%v.%u]). Modified version at pastebin.com/rRAbqBWm There are 2 config strings - first one compacts date display and adds week.day. Second one also modifies text color (to match the default text panel text color in Ambiance Theme) and increases font size so that I could read it :).
    – koushik
    Aug 5 '10 at 7:16

Here is my custom time format.... <sup> <span font_desc="Droid Sans 14" color="green"> %a %b %d </span> <span font_desc="Droid Sans 20" weight="Bold" color="green" >%l:%M %p</span></sup> ....Works well with a dark panel color. Change the color code to suit your needs.

alt text


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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