Hi i upgraded to django 1.4 and i want to take advantage of the timezone support, i got a few datetime fields saved in postgres, and they were saved assuming the timezone of my city, once i set
USE_TZ = True
And set the timezone to my city the date filter tags in my templates output the correct hour(timezoned)
{{ concert.datetime|date:'f' }}
The problem is: i use the datetime to build my urls, like this:
{% url event artist_slug=concert.slug_name hour=concert.datetime.hour %}
And those are not correctly timezoned, the hour is still in UTC and that changes my links, something i can't do, it would lose all the page rank and lots of sites link to use, is not feasible, not to mention that it looks weird that the url has a different hour than the one advertised. I tried this:
{% url event artist_slug=concert.slug_name hour=concert.datetime.hour|date:'H' %}
Without success, the date filter tag is not applied and an exception is rised. I have a fairily large codebase and lots of templates, is there any way to fix this without using an accesor that returns the datetime timezoned?
Thank you.