Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed DateTest timezone settings

Backport from 3.x, see d1a9e2b and 0aeda5c
  • Loading branch information...
commit f86bd977a4e7ddebf9b3089d34679e1f2487bef2 1 parent 3268c0d
@chillu chillu authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 tests/fieldtypes/DateTest.php
View
6 tests/fieldtypes/DateTest.php
@@ -10,14 +10,14 @@ class DateTest extends SapphireTest {
function setUp() {
// Set timezone to support timestamp->date conversion.
// We can't use date_default_timezone_set() as its not supported prior to PHP 5.2
- $this->originalTZ = ini_get('date.timezone');
- ini_set('date.timezone','Pacific/Auckland');
+ $this->originalTZ = date_default_timezone_get();
+ date_default_timezone_set('Pacific/Auckland');
parent::setUp();
}
function tearDown() {
- ini_set('date.timezone',$this->originalTZ);
+ date_default_timezone_set($this->originalTZ);
parent::tearDown();
}
Please sign in to comment.
Something went wrong with that request. Please try again.