diff options
Diffstat (limited to 'lib/private/log/owncloud.php')
-rw-r--r-- | lib/private/log/owncloud.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/log/owncloud.php b/lib/private/log/owncloud.php index 1af989588d1..721bc6002fa 100644 --- a/lib/private/log/owncloud.php +++ b/lib/private/log/owncloud.php @@ -66,13 +66,16 @@ class OC_Log_Owncloud { // default to ISO8601 $format = $config->getValue('logdateformat', 'c'); - $logtimezone = $config->getValue( "logtimezone", 'UTC' ); + $logTimeZone = $config->getValue( "logtimezone", 'UTC' ); try { - $timezone = new DateTimeZone($logtimezone); + $timezone = new DateTimeZone($logTimeZone); } catch (Exception $e) { $timezone = new DateTimeZone('UTC'); } $time = DateTime::createFromFormat("U.u", microtime(true), $timezone); + if ($time === false) { + $time = new DateTime(null, $timezone); + } $request = \OC::$server->getRequest(); $reqId = $request->getId(); $remoteAddr = $request->getRemoteAddress(); |