Commit 6efa7286 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #20540 from owncloud/fix-format-call-in-logger

Try to fix logging errors we did observe on ci ....
parents aba11995 6ffd042a
......@@ -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();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment