From 668709e3e3a50b83c3a9877476e3ceda4a22e9a1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 3 Nov 2005 02:21:48 +0000 Subject: [PATCH] * Use wfTimestamp() instead of custom functions --- includes/Export.php | 9 +-------- includes/SpecialImport.php | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/includes/Export.php b/includes/Export.php index c57831f2cf..bc14dcff1f 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -357,7 +357,7 @@ class XmlDumpWriter { $out = " \n"; $out .= " " . wfElement( 'id', null, strval( $row->rev_id ) ) . "\n"; - $ts = wfTimestamp2ISO8601( strval( $row->rev_timestamp ) ); + $ts = wfTimestamp( TS_ISO_8601, $row->rev_timestamp ); $out .= " " . wfElement( 'timestamp', null, $ts ) . "\n"; $out .= " \n"; @@ -671,13 +671,6 @@ class DumpMultiWriter { } } - - -function wfTimestamp2ISO8601( $ts ) { - #2003-08-05T18:30:02Z - return preg_replace( '/^(....)(..)(..)(..)(..)(..)$/', '$1-$2-$3T$4:$5:$6Z', wfTimestamp( TS_MW, $ts ) ); -} - function xmlsafe( $string ) { $fname = 'xmlsafe'; wfProfileIn( $fname ); diff --git a/includes/SpecialImport.php b/includes/SpecialImport.php index ef736617ca..467bee5870 100644 --- a/includes/SpecialImport.php +++ b/includes/SpecialImport.php @@ -136,7 +136,7 @@ class WikiRevision { function setTimestamp( $ts ) { # 2003-08-05T18:30:02Z - $this->timestamp = preg_replace( '/^(....)-(..)-(..)T(..):(..):(..)Z$/', '$1$2$3$4$5$6', $ts ); + $this->timestamp = wfTimestamp( TS_MW, $ts ); } function setUsername( $user ) { -- 2.20.1