This commit is contained in:
tim 2017-08-18 15:24:03 +12:00
parent b40a66422b
commit 030dd83613
2 changed files with 3 additions and 3 deletions

View File

@ -402,7 +402,7 @@ class GoogleSitemap
->limit($countPerFile, ($i - 1) * $countPerFile)
->last();
$lastModified = ($sliced) ? $sliced->dbObject('LastEdited')->Format('Y-m-d') : date('Y-m-d');
$lastModified = ($sliced) ? date('Y-m-d', strtotime($sliced->LastEdited)): date('Y-m-d');
$sitemaps->push(new ArrayData(array(
'ClassName' => $this->sanitiseClassName($class),

View File

@ -4,7 +4,7 @@
<% loop $Items %>
<url>
<loc>$AbsoluteLink</loc>
<% if $LastEdited %><lastmod>$LastEdited.Format(c)</lastmod><% end_if %>
<% if $LastEdited %><lastmod>$LastEdited.Format(YYYY-MM-dd)</lastmod><% end_if %>
<% if $ChangeFrequency %><changefreq>$ChangeFrequency</changefreq><% end_if %>
<% if $GooglePriority %><priority>$GooglePriority</priority><% end_if %>
</url>