Fixed Timezone in CalendarApiController (#763)

`PHP Warning:  DateTime::setTimezone() expects parameter 1 to be DateTimeZone, string given in /var/www/grocy/controllers/CalendarApiController.php on line 22`
This commit is contained in:
tsia 2020-04-19 14:55:08 +02:00 committed by GitHub
parent 0e2a067e30
commit eb190537e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ class CalendarApiController extends BaseApiController
foreach($events as $event)
{
$date = new \DateTime($event['start']);
$date->setTimezone(date_default_timezone_get());
$date->setTimezone(new \DateTimeZone(date_default_timezone_get()));
if ($event['date_format'] === 'date')
{