* API: Allow for query extensions
[mediawiki.git] / maintenance / parserTestsParserTime.php
blob68541cfbb1a6dc65e155f0720bdcb45ae14cba9e
1 <?php
2 if ( ! defined( 'MEDIAWIKI' ) )
3 die( -1 );
4 /**
5 * A basic extension that's used by the parser tests to test date magic words
7 * Handy so that we don't have to upgrade the parsertests every second to
8 * compensate with the passage of time and certainly less expensive than a
9 * time-freezing device, get yours now!
11 * @addtogroup Maintenance
13 * @author Ævar Arnfjörð Bjarmason <avarab@gmail.com>
14 * @copyright Copyright © 2005, 2006 Ævar Arnfjörð Bjarmason
15 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
18 $wgHooks['ParserGetVariableValueTs'][] = 'wfParserTimeSetup';
20 function wfParserTimeSetup( &$parser, &$ts ) {
21 $ts = 123; //$ perl -le 'print scalar localtime 123' ==> Thu Jan 1 00:02:03 1970
23 return true;