I would like to globally set the Linux date format to ISO, which looks roughly like this:

YYYY-MM-DD HH:MM:SS
2009-03-16 15:20:00

With varying levels of detail, such as omitting time, seconds, etc.

I know that for some applications, you can configure this manually, but I'd like it to be automatically set for every program.

I'm specifically using Ubuntu Intrepid, but a general solution that would work across all distributions would be best.

link|improve this question

feedback

4 Answers

up vote 2 down vote accepted

It's explained at length in this guide: http://ccollins.wordpress.com/2009/01/06/how-to-change-date-formats-on-ubuntu/

link|improve this answer
I went and found the link since prestiginate said he couldn't post hyperlinks. And I actually had been there before, but I guess I never bothered doing it on this machine, making me think whatever I tried before didn't work. – Neil Jun 1 '09 at 21:18
feedback

Set your locale date environment variable LC_TIME to "en_DK" Set it in your .bashrc or similar, or check man locale for how to set it system-wide.

On ArchLinux all of the Locale settings are in /etc/rc.conf and customisations are set up in /etc/rc.local

#!/bin/bash
# Local multi-user startup script
export LC_TIME="en_DK"
link|improve this answer
feedback

Some people would advise to change your local to german "en_DK" this kind of works if you don't mind the day and month names being in german. Since I cannot post hyperlinks,and this board sees my linux commands as hyperlinks.... (nice one)... I can only say you search (google) how-to-change-date-formats-on-ubuntu and click the first link.

link|improve this answer
He meant this link: ccollins.wordpress.com/2009/01/06/… – Neil Jun 1 '09 at 21:16
en_DK is not the German locale either, it's danish. – GodEater Jun 2 '09 at 7:08
feedback

Probably the best way to do this, but not break things is to follow the walkthrough at

http://ccollins.wordpress.com/2009/01/06/how-to-change-date-formats-on-ubuntu/

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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