Fixed #21992: Skipped test when pytz is missing.

The test fails on Windows when pytz is not installed.