For one of my trac apps (there are several on my server) I need to change the date display format to YYYY-MM-DD. Searching the docs, I find all sorts of suggestions on how to do this, but I'm too clueless on Apache to understand how to implement the suggestions. In the Trac faq, I see: You change the format by setting an appropriate 'locale' in the configuration of your webserver. You do this for Apache by adding
That's great, seems like exactly what I want. But, I'm not sure where I add this setting. Is it in .htaccess? If so, where in the file system should the .htaccess file reside? Or do I add these lines somewhere else? I'm learning Apache now, and I'm sure I'll figure this out before too long, but if anyone could help me out in the mean time it would be greatly appreciated! asked 14 Jan '12, 07:28 rodj |
Hi, You need to put this line in a .htaccess file, which needs to be located in the ~/webapps/<appname> directory (where <appname> stands for the name of your trac app). answered 14 Jan '12, 07:39 todork Thanks, that helped. I now know where to put the .htaccess! But I still can't figure out how to get YYYY-MM-DD. Searching the web, I see tons of people talking about this, and one suggestion is to use the locale en_DK. Looks like that is not a "real" locale, and that it is not supported here at Webfaction? Anyone know how to get YYYY-MM-DD?
(20 Jan '12, 19:02)
rodj
You have to select the locale, the language code and the country code. that will set the correct time/date stamps.
(20 Jan '12, 19:36)
johns
I tried "en_DK", which is the one I want, and I got a trac error: Trac detected an internal error: ValueError: unknown locale: en_DK That is what led me to (mistakenly) believe that locale en_DK was not supported by Webfaction. I see that it is indeed listed by the command "locale -a". Anyway, switching to using SetEnv LC_TIME "en_DK.UTF_8" does exactly what I want.
(21 Jan '12, 17:28)
rodj
|