diff --git a/core/modules/datetime/src/Tests/Views/FilterDateTimeTest.php b/core/modules/datetime/src/Tests/Views/FilterDateTimeTest.php index 5eac489..02b12b3 100644 --- a/core/modules/datetime/src/Tests/Views/FilterDateTimeTest.php +++ b/core/modules/datetime/src/Tests/Views/FilterDateTimeTest.php @@ -28,6 +28,11 @@ class FilterDateTimeTest extends DateTimeHandlerTestBase { protected static $date; /** + * Use a non-UTC timezone. + */ + protected static $timezone = 'America/Vancouver'; + + /** * {@inheritdoc} */ public function setUp() { @@ -173,7 +178,7 @@ protected function _testExact() { $view->filter[$field]->value['max'] = ''; // Use the date from node 3. Use the site timezone (mimics a value entered // through the UI). - $view->filter[$field]->value['value'] = \Drupal::service('date.formatter')->format(static::$date, 'custom', DATETIME_DATETIME_STORAGE_FORMAT); + $view->filter[$field]->value['value'] = \Drupal::service('date.formatter')->format(static::$date, 'custom', DATETIME_DATETIME_STORAGE_FORMAT, static::$timezone); $view->setDisplay('default'); $this->executeView($view); $expected_result = array(