Fixed #21992: Skip test when pytz is missing

Submitting this again since I managed to mess up Git in the meantime.