From: Ævar Arnfjörð Bjarmason Date: Thu, 3 Nov 2005 02:21:48 +0000 (+0000) Subject: * Use wfTimestamp() instead of custom functions X-Git-Tag: 1.6.0~1236 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=668709e3e3a50b83c3a9877476e3ceda4a22e9a1;p=lhc%2Fweb%2Fwiklou.git * Use wfTimestamp() instead of custom functions --- 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 ) {