From 7a8e4b1ec83803be99517c226dda05888e1bce19 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sun, 8 Jan 2006 22:31:17 +0000 Subject: [PATCH] * An extension for the parsertests that modifies the date reported by the parser --- maintenance/parserTestsParserTime.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 maintenance/parserTestsParserTime.php diff --git a/maintenance/parserTestsParserTime.php b/maintenance/parserTestsParserTime.php new file mode 100644 index 0000000000..727c4dc650 --- /dev/null +++ b/maintenance/parserTestsParserTime.php @@ -0,0 +1,25 @@ + + * @copyright Copyright © 2005, 2006 Ævar Arnfjörð Bjarmason + * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later + */ + +$wgHooks['ParserGetVariableValueTs'][] = 'wfParserTimeSetup'; + +function wfParserTimeSetup( &$parser, &$ts ) { + $ts = 123; //$ perl -le 'print scalar localtime 123' ==> Thu Jan 1 00:02:03 1970 + + return true; +} -- 2.20.1