Fix event start time not being properly converted to UTC

- This was triggering unexpected time comparison errors
This commit is contained in:
Hypolite Petovan 2022-12-02 19:37:39 -05:00
parent 1b71b963d7
commit 349436a77a

View file

@ -152,7 +152,7 @@ class API extends BaseModule
$share = intval($request['share'] ?? 0); $share = intval($request['share'] ?? 0);
$isPreview = intval($request['preview'] ?? 0); $isPreview = intval($request['preview'] ?? 0);
$start = DateTimeFormat::convert($strStartDateTime ?? DBA::NULL_DATETIME, $this->timezone); $start = DateTimeFormat::convert($strStartDateTime ?? DBA::NULL_DATETIME, 'UTC', $this->timezone);
if (!$noFinish) { if (!$noFinish) {
$finish = DateTimeFormat::convert($strFinishDateTime ?? DBA::NULL_DATETIME, 'UTC', $this->timezone); $finish = DateTimeFormat::convert($strFinishDateTime ?? DBA::NULL_DATETIME, 'UTC', $this->timezone);
} else { } else {