Using {{today|time:"TIME_FORMAT"}}
correctly localises times when I switch languages in my Django 1.2.3 project. E.g. for English I see "12:19 a.m."
and when I switch to German it changes to "12:19:25"
.
As far as I can tell from looking at the docs and code (defaultfilters.py
and formats.py
) just using {{today:time}}
should do the same thing and default to TIME_FORMAT
but this isn't working and it always uses the default English format.
Is there a way to avoid having to edit all my templates and change them to {{today|time:"TIME_FORMAT"}}
?
The same thing happens with the date
filter and DATE_FORMAT
.