Commit ef105e70 authored by alexpott's avatar alexpott
Browse files

Issue #2498619 by pjonckiere, mpdonadio: Unit tests should use a default timezone other that UTC

parent eee99e21
......@@ -169,7 +169,7 @@ public function testFormatIntervalZeroSecond() {
public function testGetSampleDateFormats() {
$timestamp = strtotime('2015-03-22 14:23:00');
$expected = $this->dateFormatter->getSampleDateFormats('en', $timestamp, 'Europe/London');
$expected = $this->dateFormatter->getSampleDateFormats('en', $timestamp, 'Australia/Sydney');
// Removed characters related to timezone 'e' and 'T', as test does not have
// timezone set.
......@@ -87,5 +87,8 @@ function drupal_phpunit_register_extension_dirs(Composer\Autoload\ClassLoader $l
setlocale(LC_ALL, 'C');
// Set the default timezone. While this doesn't cause any tests to fail, PHP
// complains if 'date.timezone' is not set in php.ini.
// complains if 'date.timezone' is not set in php.ini. The Australia/Sydney
// timezone is chosen so all tests are run using an edge case scenario (UTC+10
// and DST). This choice is made to prevent timezone related regressions and
// reduce the fragility of the testing system in general.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment