Skip to content
Snippets Groups Projects
Unverified Commit bbc518ad authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3251100 by NickDickinsonWilde: DateTimeWidgetBase sets Timezone twice to the same value

(cherry picked from commit 4e34cd3f)
parent d2a903bb
No related branches found
No related tags found
No related merge requests found
......@@ -33,11 +33,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
}
if ($items[$delta]->date) {
$date = $items[$delta]->date;
// The date was created and verified during field_load(), so it is safe to
// use without further inspection.
$date->setTimezone(new \DateTimeZone($element['value']['#date_timezone']));
$element['value']['#default_value'] = $this->createDefaultValue($date, $element['value']['#date_timezone']);
$element['value']['#default_value'] = $this->createDefaultValue($items[$delta]->date, $element['value']['#date_timezone']);
}
return $element;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment