Bug sitemap date format
This commit is contained in:
parent
470c017184
commit
b403816c88
@ -1074,7 +1074,7 @@ class common
|
|||||||
foreach ($this->getData(['module', $parentPageId, 'posts']) as $articleId => $article) {
|
foreach ($this->getData(['module', $parentPageId, 'posts']) as $articleId => $article) {
|
||||||
if ($this->getData(['module', $parentPageId, 'posts', $articleId, 'state']) === true) {
|
if ($this->getData(['module', $parentPageId, 'posts', $articleId, 'state']) === true) {
|
||||||
$date = $this->getData(['module', $parentPageId, 'posts', $articleId, 'publishedOn']);
|
$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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user