I needed that so that API users, who should not be using internal wiki timestamps but instead use ISO ones. The alternative was for me to decode expiry field value myself (the IF statement). Obviously I could go that route, but there goes the code/concepts reuse :)
On 6/18/07, Brion Vibber brion@wikimedia.org wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
yurik@svn.wikimedia.org wrote:
static function decodeExpiry( $expiry ) {
static function decodeExpiry( $expiry, $timestampType = TS_MW ) { if ( $expiry == '' || $expiry == Block::infinity() ) { return Block::infinity(); } else {
return wfTimestamp( TS_MW, $expiry );
return wfTimestamp( $timestampType, $expiry ); } }
I don't really like this... it seems a bit odd to have it return a different timestamp format than the one that is used for all internal processing.
- -- brion vibber (brion @ wikimedia.org)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGdu8pwRnhpk1wk44RAl16AJwOK65mbFg1BsGOoJdRHZgTZ3q1BQCguFNa YsJ3BhAMFX05xgVst5U9G6c= =apff -----END PGP SIGNATURE-----
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l