From e20c3b5579e632df2d59e360cb7a34b20e4d61cb Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 3 Dec 2008 21:21:35 +0000 Subject: [PATCH] false failures correction, thanks to Michal Biniek --- test/PMA_localisedDateTimespan_test.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/test/PMA_localisedDateTimespan_test.php b/test/PMA_localisedDateTimespan_test.php index 4218848b8..6c9884f0a 100644 --- a/test/PMA_localisedDateTimespan_test.php +++ b/test/PMA_localisedDateTimespan_test.php @@ -37,6 +37,12 @@ class PMA_localisedDateTimespan_test extends PHPUnit_Framework_TestCase protected $tmpSession; + /** + * temporary variable for timezone info + */ + + protected $tmpTimezone; + /** * storing globals and session */ @@ -44,7 +50,8 @@ class PMA_localisedDateTimespan_test extends PHPUnit_Framework_TestCase $this->tmpGlobals = $GLOBALS; $this->tmpSession = $_SESSION; - + $this->tmpTimezone = date_default_timezone_get(); + date_default_timezone_set('Europe/London'); } /** @@ -54,6 +61,7 @@ class PMA_localisedDateTimespan_test extends PHPUnit_Framework_TestCase $GLOBALS = $this->tmpGlobals; $_SESSION = $this->tmpSession; + date_default_timezone_set($this->tmpTimezone); } @@ -63,8 +71,8 @@ class PMA_localisedDateTimespan_test extends PHPUnit_Framework_TestCase public function localisedDateDataProvider() { return array( - array(1227451958, '', 'Nov 23, 2008 at 03:52 PM'), - array(1227451958, '%Y-%m-%d %H:%M:%S %a', '2008-11-23 15:52:38 Sun') + array(1227455558, '', 'Nov 23, 2008 at 03:52 PM'), + array(1227455558, '%Y-%m-%d %H:%M:%S %a', '2008-11-23 15:52:38 Sun') ); }