Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
This commit is contained in:
Maxence Lange 2018-09-05 11:12:13 +02:00
parent 21b2285504
commit 16a1daeb41

View file

@ -69,7 +69,7 @@ class TimezoneService {
$timezone = $this->configService->getCoreValueForUser($userId, 'timezone', 'UTC');
$date = \DateTime::createFromFormat('Y-m-d H:i:s', $time);
if ($date === false) {
return date('Y-m-d H:i:s', $time);
return $time;
}
$date->setTimezone(new \DateTimeZone($timezone));