﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
10825	Template filter date 'U' raises an AttributeError under certain circumstances	Matthias Kestenholz	Michael Radziej	"While fixing #10048 in [9919] a new bug has been introduced. Around line 200 in django/utils/dateformat.py:

{{{
    def U(self):
        ""Seconds since the Unix epoch (January 1 1970 00:00:00 GMT)""
        off = self.timezone and self.timezone.utcoffset(self.data) or 0
        return int(time.mktime(self.data.timetuple())) + off.seconds * 60
}}}

If self.timezone and self.timezone.utfoffset(self.data) evaluates to False, Django tries to access off.seconds but off is 0 => An AttributeError (int has no attribute seconds) is raised.

Unfortunately I do not know enough about the timezone handling to provide a test or even a fix."		closed	Template system	dev		fixed	template date		Ready for checkin	1	0	0	0	0	0
