diff --git a/core/modules/user/src/Tests/UserTimeZoneTest.php b/core/modules/user/src/Tests/UserTimeZoneTest.php index cbf26cd..396add4 100644 --- a/core/modules/user/src/Tests/UserTimeZoneTest.php +++ b/core/modules/user/src/Tests/UserTimeZoneTest.php @@ -28,6 +28,13 @@ public function testUserTimeZone() { ->set('timezone.user.configurable', 1) ->set('timezone.default', 'America/Los_Angeles') ->save(); + + // Load the 'medium' date format, which is the default for node creation + // time, and override it. Since we are testing time zones with Daylight + // Saving Time, and need to future proof against changes to the zoneinfo + // database, we choose the 'I' format placeholder instead of a + // human-readable zone name. With 'I', a 1 means the date is in DST, and 0 + // if not. DateFormat::load('medium') ->setPattern('Y-m-d H:i I') ->save();