]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blob - maintenance/parserTestsParserTime.php
MediaWiki 1.11.0-scripts
[autoinstalls/mediawiki.git] / maintenance / parserTestsParserTime.php
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
6  *
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!
10  *
11  * @addtogroup Maintenance
12  *
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
16  */
17
18 $wgHooks['ParserGetVariableValueTs'][] = 'wfParserTimeSetup';
19
20 function wfParserTimeSetup( &$parser, &$ts ) {
21         $ts = 123; //$ perl -le 'print scalar localtime 123' ==> Thu Jan  1 00:02:03 1970
22         
23         return true;
24 }
25