django/django — pull request #558 by gwrtheyrn (2012-11-27 14:45:45+00:00)
Title: Fix for ticket 19370 (date filter returns empty string for midnight)

Ticket 19370: https://code.djangoproject.com/ticket/19370

Python considers midnight (`datetime.time(0, 0)`) to be `False`. The date template filter stumbles over this.

When using `{{ midnight|date:"H:i" }}`, Django returns an empty string.

See ​http://bugs.python.org/issue13936 for discussion about the bug.

This is already fixed in the `|time` filter, but not in the `|date` filter which can also be used to format times.