reverted: --- b/core/modules/datetime/datetime.module +++ a/core/modules/datetime/datetime.module @@ -46,11 +46,11 @@ * Sets a consistent time on a date without time. * * The default time for a date without time can be anything, so long as it is + * consistently applied. If we use noon, dates in most timezones will have the + * same value for in both the local timezone and UTC. - * consistently applied. Since no timezone conversion is done for date-only - * fields, simply use 00:00:00 to avoid confusion. * * @param $date */ function datetime_date_default_time($date) { + $date->setTime(12, 0, 0); - $date->setTime(0, 0, 0); } diff -u b/core/modules/datetime/src/Tests/DateTimeFieldTest.php b/core/modules/datetime/src/Tests/DateTimeFieldTest.php --- b/core/modules/datetime/src/Tests/DateTimeFieldTest.php +++ b/core/modules/datetime/src/Tests/DateTimeFieldTest.php @@ -188,6 +188,10 @@ $options = array( 'format_type' => array('short', 'medium', 'long'), ); + // Formats that display a time component for date-only fields will display + // the default time, so that is applied before calculating the expected + // value. + datetime_date_default_time($date); foreach ($options as $setting => $values) { foreach ($values as $new_value) { // Update the entity display settings.