I'm writing tests that assert dates are being properly rendered on a certain page, but the tests are failing because the date value on the model object is in UTC, and the date is rendered in local time on the template. I'd like to run that date value through the same mechanism by which the template converts it to local time, so that my test does the same thing as the template.
I've looked around, and unfortunately been unable to find the code that does the automatic conversion. The "date" template filter doesn't do it, and I'm too ignorant of the nitty gritty details of django template system to know what else I should be looking for.
Any help would be appreciated.