Skip to content

Sitemap plugin produces sometimes invalid timestamps for <lastmod> XML tag #45

Description

@max-pfeiffer

I noticed that this plugin produces invalid timestamps <lastmod>2025-11-22T11:17:34-00:00</lastmod>. -00:00 is not a valid ISO-8601 timezone. The proper value would be +00:00. See also the ISO-8601 wiki on that topic.

This seems to happen only for the standard pages like authors categories etc., not for articles:

<url>
<loc>http://127.0.0.1:8000/</loc>
<lastmod>2025-11-22T11:17:34-00:00</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>

<url>
<loc>http://127.0.0.1:8000/archives.html</loc>
<lastmod>2025-11-22T11:17:34-00:00</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>

<url>
<loc>http://127.0.0.1:8000/author/max-pfeiffer.html</loc>
<lastmod>2025-11-22T11:17:34-00:00</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>

<url>
<loc>http://127.0.0.1:8000/authors.html</loc>
<lastmod>2025-11-22T11:17:34-00:00</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>

<url>
<loc>http://127.0.0.1:8000/categories.html</loc>
<lastmod>2025-11-22T11:17:34-00:00</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>

<url>
<loc>http://127.0.0.1:8000/category/misc.html</loc>
<lastmod>2025-11-22T11:17:34-00:00</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>

Googles parser is very strict here. In Google Search console I see that my sitemap which is generated by this plugin could not be parsed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions