diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-11-16 16:20:42 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-11-16 16:29:21 +0100 |
commit | 6ffd042a64b7d75fc1ca1939a43de3fd107b1b80 (patch) | |
tree | e71462c272b311f987d2085076908114654f3e23 /lib | |
parent | 8169e4fdc87f5032a9dd9b471dccff2d7da81dc5 (diff) | |
download | nextcloud-server-6ffd042a64b7d75fc1ca1939a43de3fd107b1b80.tar.gz nextcloud-server-6ffd042a64b7d75fc1ca1939a43de3fd107b1b80.zip |
fixes #20538
Diffstat (limited to 'lib')
-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(); |