1

Apparent I should set LC_TIME to en_DK (why danish? I don't want danish months!) but nothing I've done manages to change the output of locale.

2 Answers 2

4

What do you want to achieve? To change the format temporarily

$ date
Mon Feb 21 18:46:57 CET 2011
$ LANG=cs_CZ.utf8 date
Po úno 21 18:47:22 CET 2011

or permanently by putting the variables in /etc/default/locale?

2
  • Permanently, but only the time format (24h), dd-mm-yyyy, not the language, and /etc/default/locale already contains LC_TIME=en_DK.UTF-8 but it doesn't affect the output of locale. Feb 21, 2011 at 18:26
  • 1
    But why? The output of LANG=en_DK.utf8 date is the same as of LANG=en_US.utf8 date. Or you want something like date +%d-%m-%Y?
    – arrange
    Feb 21, 2011 at 19:10
2

@arrange I had the same as you. But i resolved it. Additionally you need to add

export TIME_STYLE="long-iso"
export LC_TIME="en_DK.UTF-8"

to ~/.bashrc file at the end and relogin my user or execute:

source ~/.bashrc

Then ls -l print 2017-01-22 21:45 date format.

Maybe it help for another.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .