This commit is contained in:
Thomas Müller 2015-11-16 16:20:42 +01:00
parent 8169e4fdc8
commit 6ffd042a64
1 changed files with 5 additions and 2 deletions

View File

@ -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();