Fix broken upcoming feature

Using a FlexForm results in stored Unixtimestamps.
Adding 00:00 and using strtotime will result in false, resulting in
null.

We now just keep the provided value as integer.
That way underlying code works as expected and delivers events from
given start date.

Relates: #9352, #8581
This commit is contained in:
Daniel Siepmann 2021-10-11 11:28:33 +02:00
parent f0ee19cfae
commit c38241f351

View file

@ -142,10 +142,10 @@ class DateController extends AbstractController
$demand->setSortOrder((string)$this->settings['sortOrder']); $demand->setSortOrder((string)$this->settings['sortOrder']);
$demand->setHighlight((bool)$this->settings['highlight']); $demand->setHighlight((bool)$this->settings['highlight']);
if (!empty($this->settings['start'])) { if (!empty($this->settings['start'])) {
$demand->setStart(strtotime($this->settings['start'] . ' 00:00') ?: null); $demand->setStart((int)$this->settings['start']);
} }
if (!empty($this->settings['end'])) { if (!empty($this->settings['end'])) {
$demand->setEnd(strtotime($this->settings['end'] . ' 00:00') ?: null); $demand->setEnd((int)$this->settings['end']);
} }
if (!empty($this->settings['limit'])) { if (!empty($this->settings['limit'])) {