summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-11-18 09:18:54 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-11-18 09:18:54 +0100
commit6efa72867a300dd8399ad2d47de4f5189ded961f (patch)
tree6b69952510d331317480c7e6bbd0d6f9736aaf2c /lib
parentaba119951ebe2d552458a5bd184a66319937fd17 (diff)
parent6ffd042a64b7d75fc1ca1939a43de3fd107b1b80 (diff)
downloadnextcloud-server-6efa72867a300dd8399ad2d47de4f5189ded961f.tar.gz
nextcloud-server-6efa72867a300dd8399ad2d47de4f5189ded961f.zip
Merge pull request #20540 from owncloud/fix-format-call-in-logger
Try to fix logging errors we did observe on ci ....
Diffstat (limited to 'lib')
-rw-r--r--lib/private/log/owncloud.php7
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();