Fixes #23714 -- `date` filter during DST change

The except block catching all exceptions is ugly, but I can't rely on `pytz` library, which is optional, and therefore I can't catch `pytz.exceptions.AmbiguousTimeError` exception.
`self.timezone.tzname(self.data)` only raises an exception under pytz, right?

In that case, we should have an ImportError-guarded import of `AmbiguousTimeError`, replacing it with a custom exception class (that nothing will ever raise) if it can't be imported. That way if pytz is installed, this will catch `AmbiguousTimeError` only, and if pytz is not installed, this will never catch anything.