diff --git a/core/core.php b/core/core.php index d7444177..13953517 100644 --- a/core/core.php +++ b/core/core.php @@ -1074,8 +1074,8 @@ class common foreach ($this->getData(['module', $parentPageId, 'posts']) as $articleId => $article) { if ($this->getData(['module', $parentPageId, 'posts', $articleId, 'state']) === true) { $date = $this->getData(['module', $parentPageId, 'posts', $articleId, 'publishedOn']); - $sitemap->addUrl('/' . $parentPageId . '/' . $articleId, new DateTime("@{$date}", new DateTimeZone($timezone))); - } + $sitemap->addUrl('/' . $parentPageId . '/' . $articleId, DateTime::createFromFormat('U', $date)); + } } } // Sous-pages @@ -1097,7 +1097,7 @@ class common if ($this->getData(['module', $childKey, 'posts', $articleId, 'state']) === true) { $date = $this->getData(['module', $childKey, 'posts', $articleId, 'publishedOn']); $sitemap->addUrl('/' . $childKey . '/' . $articleId, new DateTime("@{$date}", new DateTimeZone($timezone))); - } + } } } }