diff --git a/core/tests/Drupal/Tests/Core/Datetime/DrupalDateTimeTest.php b/core/tests/Drupal/Tests/Core/Datetime/DrupalDateTimeTest.php index 666512d..caff97c 100644 --- a/core/tests/Drupal/Tests/Core/Datetime/DrupalDateTimeTest.php +++ b/core/tests/Drupal/Tests/Core/Datetime/DrupalDateTimeTest.php @@ -160,7 +160,8 @@ public function providerTestInvalidDateDiff() { * Tests that object methods are chainable. */ public function testChainable() { - $date = new DrupalDateTime('now', NULL, ['langcode' => 'en']); + $tz = new \DateTimeZone(date_default_timezone_get()); + $date = new DrupalDateTime('now', $tz, ['langcode' => 'en']); $date->setTimestamp(12345678); $rendered = $date->render(); @@ -172,14 +173,3 @@ public function testChainable() { } } - -namespace Drupal\Core\Datetime; - -/** - * Shadow drupal_get_user_timezone(). - * - * @returns string - */ -function drupal_get_user_timezone() { - return date_default_timezone_get(); -}