Sitemap with wrong lastmod-tag
I have limited skills about server administration but Tiki24.0 was outputting the date on my several sitemaps correctly. Supposing your database was created using Tiki install, it should be correct and I wouldn't try to modify it.
I would look at time encoding on the MySQL level or the server.
Look at http://yourdomain.com/tiki-check.php
you may found key to your problem. 😉
The tiki-check.php look ok. All time stuff look good for me, but I don't realy know where and what.
In tiki-listpages.php there are the correct dates.
Manual modification in the tiki_page.lastModif field to 0 shows the current date in the sitemap! I expected here the 1970 date.
My solution:
\vendor_bundled\vendor\melbahja\seo\src\Sitemap\SitemapBuilder.php
protected function pasreDate($date): string { if (is_int($date) === false) { //$date = strtotime($date); } return date('c', $date); }
I "disabled" the if statement.
I have no idea, where the data for $date come from. And why should it not be an INT value like in the DB?