Fixed #23403 -- Fixed crash in contrib.sitemaps if lastmod returned a date rather than datetime.

This patch looks mostly good and works for me.

My one suggestion is that the test with a date object be explicit, like ``test_sitemap_last_modified_tz``, rather than put into the i18n test.