From 0e07a982daeabe30a6e6eec44d53dc7671e4a742 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 3 Nov 2005 02:22:53 +0000 Subject: [PATCH] * The sitemap protocol supports any ISO 8601 timestamp, use an exact timestamp rather than just YYYY-MM-DD --- maintenance/generateSitemap.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/maintenance/generateSitemap.php b/maintenance/generateSitemap.php index dfca76ee0d..b8328085d7 100644 --- a/maintenance/generateSitemap.php +++ b/maintenance/generateSitemap.php @@ -9,7 +9,7 @@ * @copyright Copyright © 2005, Jens Frank * @copyright Copyright © 2005, Brion Vibber * - * @link https://www.google.com/webmasters/sitemaps/docs/en/about.html + * @link http://www.google.com/webmasters/sitemaps/docs/en/about.html * @link http://www.google.com/schemas/sitemap/0.84/sitemap.xsd * * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later @@ -137,7 +137,7 @@ class GenerateSitemap { } ++$i; $title = Title::makeTitle( $row->page_namespace, $row->page_title ); - $date = $this->ISO8601( $row->page_touched ); + $date = wfTimestamp( TS_ISO_8601, $row->page_touched ); gzwrite( $this->file, $this->fileEntry( $title->getFullURL(), $date, $this->priority( $namespace ) ) ); } if ( $this->file ) { @@ -191,10 +191,6 @@ class GenerateSitemap { return "\n"; } - function ISO8601( $timestamp ) { - return substr( wfTimestamp( TS_DB, $timestamp ), 0, 4 + 1 + 2 + 1 + 2 ); - } - function debug( $str ) { fwrite( $this->stderr, "$str\n" ); } -- 2.20.1