diff --git a/core/lib/Drupal/Core/Datetime/Element/Datelist.php b/core/lib/Drupal/Core/Datetime/Element/Datelist.php index c330a4f..f50bc0f 100644 --- a/core/lib/Drupal/Core/Datetime/Element/Datelist.php +++ b/core/lib/Drupal/Core/Datetime/Element/Datelist.php @@ -185,10 +185,7 @@ public static function processDatelist(&$element, FormStateInterface $form_state if ($date instanceOf DrupalDateTime) { $element['#date_timezone'] = $date->getTimezone()->getName(); } - elseif (!empty($element['#timezone'])) { - $element['#date_timezone'] = $element['#date_timezone']; - } - else { + elseif (empty($element['#timezone'])) { $element['#date_timezone'] = drupal_get_user_timezone(); }