Inside my app I use normal datetime objects. In my template:
{% load tz %}
{{datetimeobject|timezone:"Europe/Paris"}}
{% timezone "Europe/Paris" %}
{{datetimeobject}}
{% endtimezone %}
This prints something like this:
Dec. 5, 2012, 4 p.m.
Dec. 5, 2012, 3 p.m.
So the timezone filter adjusts the date but timezone tag DOES NOT.
Why is that? And how I can use tag properly? My goal is to adjusts all datetimeobjects in whole template without adding filter to every datetimeobject printed in template.
edit
I tried to make my dateobjects timezone aware:
offset = timezone('Europe/London')
datetimeobj.replace(tzinfo=offset)
But that didnt help - still of the previous code but with tz aware datetimeobject is:
Dec. 5, 2012, 4 p.m.
Dec. 5, 2012, 3 p.m.
solved: I had a mistake in above code - should be:
offset = timezone('Europe/London')
datetimeobj = datetimeobj.replace(tzinfo=offset)