eliashaeussler / cache-warmup

🔥 PHP library to warm up caches of URLs located in XML sitemaps

Home Page:https://cache-warmup.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Value '2023-03-30' does not match any of the following formats: `Y-m-d\TH:i:sP`.

lpender opened this issue · comments

PHP version

8.2

Package version

2.0.0

Application

Phar

Operating system

12.6.2

Current behavior

Run:

./cache-warmup.phar https://www.vitalcitynyc.org/sitemap.xml

Receives:

The sitemap "https://www.vitalcitynyc.org/sitemap.xml" is invalid and cannot be parsed due to the following errors:
    * Value '2023-03-30' does not match any of the following formats: `Y-m-d\TH:i:sP`.

Notes

I think that's referring to lastmod

I generated the sitemap myself so it's quite possible I'm doing it wrong.

But according to bing

This date should be in W3C Datetime format. Most common format used are the ones specifying the date YYYY-MM-DD (example 2022-12-28).

In the sitemap.xml

<lastmod>2023-03-30</lastmod>

Am I doing something wrong?

Expected behavior

Should interpret date format (i.e. 2023-03-05) correctly.

Steps to reproduce

No response

Additional context

No response

Hi @lpender, thanks for your issue. This is now resolved and part of the 2.0.1 release.