diff --git a/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php b/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php index 807307c..afef143 100644 --- a/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php +++ b/core/modules/config_translation/src/Tests/ConfigTranslationUiTest.php @@ -465,8 +465,10 @@ public function testDateFormatTranslation() { // Formatting the date 8 / 27 / 1985 @ 13:37 EST with pattern D should // display "Tue". - $formatted_date = format_date(494015820, $id, NULL, NULL, 'fr'); + $formatted_date = format_date(494015820, $id, NULL, 'Europe/Berlin', 'fr'); $this->assertEqual($formatted_date, 'Tue', 'Got the right formatted date using the date format translation pattern.'); + $formatted_date = format_date(494015820, $id, NULL, 'Asia/Tokyo', 'fr'); + $this->assertEqual($formatted_date, 'Wed', 'Got the right formatted date using the date format translation pattern.'); } } diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php index 2e8702b..941376b 100644 --- a/core/modules/simpletest/src/WebTestBase.php +++ b/core/modules/simpletest/src/WebTestBase.php @@ -779,6 +779,12 @@ protected function setUp() { ->set('js.preprocess', FALSE) ->save(); + // Set an explicit time zone to not rely on the system one, which may vary + // from setup to setup. + $config->getEditable('system.date') + ->set('timezone.default', 'Asia/Tokyo') + ->save(); + // Collect modules to install. $class = get_class($this); $modules = array();