$out = " <revision>\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 .= " <contributor>\n";
}
}
-
-
-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 );
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 ) {