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

Yes, I felt a little lazy/dirty; updated now.