Trac Date formatting issues (uk - windows)

By default, it appears that Trac is using american date format (MM/dd/yyyy) for entry and display of dates.

This is very confusing for us (as a uk company) - so I've been searching for a way to switch the date format to the uk format (dd/MM/yyyy).

After much googling, it semed that the way to set the date format for trac, was to set the locale in the location tag within the apache httpd.conf that is being handled by mod_python.

PythonOption TracLocale [locale]

So I tried entering en_GB as the locale - and got this error:

PythonHandler trac.web.modpython_frontend: Error: unsupported locale setting

So after more googling, I found that on windows, I needed to use EN-GB rather than en_GB (see here).

So I made the change and restarted apache - the error was fixed - but Trac was still showing dates as MM/dd/yyyy!!!

As a temorary workarond, I have set the locale to i18n - which causes the dates to be displayed as dd.MM.yyyy - which at least is understandable - although it does mean we get an error if we attempt to input dates in the uk format.

Has anyone any idea how we can get Trac to display UK dates correctly?

Comments
Andy Allan's Gravatar Try using:
PythonOption TracLocale "English_United Kingdom"
# Posted By Andy Allan | 14/08/07 22:45
Daniel Lancelot's Gravatar Thanks Andy - that did the trick :)

Thought you might know ;)
# Posted By Daniel Lancelot | 14/08/07 23:54
gaz's Gravatar That command makes my ubuntu server give http 500 errors to every request.
# Posted By gaz | 17/01/08 11:25
Andy Allan's Gravatar That command is for Windows, not Linux.
# Posted By Andy Allan | 17/01/08 12:58
BlogCFC was created by Raymond Camden. This blog is running version 5.5.1, hosted by TalkWebSolutions.