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.
No, I like your current solution in the code (returning empty string only for individual timezone-related format specifiers, not for the whole datetime). It just looks like this doc paragraph is out of date now and needs to be updated to match the code?