Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Presently the date is showing as mmm dd hh:mm:ss. Is there any way that I can change it to as per my liking. For example : dd mmm, hh:mm:ss.

share|improve this question
    
Look at this link. –  karthick87 May 20 '11 at 7:50
add comment

1 Answer

up vote 17 down vote accepted

Yes there is.

  • First you need to tell the indicator to use a custom format. To do so, run this from a gnome-terminal:

    gsettings set com.canonical.indicator.datetime time-format "'custom'"
    
  • Then you need to tell the indicator which format to use. This has to be done in a format understood by the strftime function. You can look it up here.

    For example, if you want the date/time to look like this: Fri, 20. May 08:25, the format string for it would be %a, %d. %h %H:%M. Now let's set it:

    gsettings set com.canonical.indicator.datetime custom-time-format "'%a, %d. %h  %H:%M'"
    

That's it!

You can also set those keys using a GUI called dconf-editor. It's part of the package dconf-tools, which you'd need to install first:

enter image description here

share|improve this answer
    
Worked great for me. I was just looking for this solution. Many many thanks htorque. –  Arindom May 20 '11 at 12:59
    
I'm running 11.10, and I don't see any settings in com.canonical.indicator.datetime; is anyone else experiencing this? –  Mike Partridge Nov 10 '11 at 3:02
    
@MikePartridge Nope, I'm still having the key and can set the date like described. Make sure you have the package indicator-datetime installed. –  htorque Nov 10 '11 at 5:34
    
@MikePartridge: On my systems (laptop and netbook), it looks like the settings are all squashed into the top of the window; there is a tiny scrollbar, but the box is too small to see any text and you can't edit anything. Effectively useless. This kind of rubbish is gonna make me ditch Unity, after giving it a serious test-run. –  SabreWolfy Jan 4 '12 at 8:37
    
+1 just for the "Then you need to tell the indicator which format to use. This has to be done in a format understood by the strftime function. You can look it up here." - I wasn't sure what format strings they were using, and found that reference awesome. Thanks! –  Breakthrough Dec 1 '12 at 19:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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