From 0a837ac64eae0a20449d4c00ed07500903728de3 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 30 Jan 2017 15:06:23 +0100 Subject: [PATCH] Revert unintentional log timestamp format change Signed-off-by: Joas Schilling --- lib/private/Console/TimestampFormatter.php | 4 ++-- lib/private/Log/File.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/private/Console/TimestampFormatter.php b/lib/private/Console/TimestampFormatter.php index d68db95f64..66dd38e6ac 100644 --- a/lib/private/Console/TimestampFormatter.php +++ b/lib/private/Console/TimestampFormatter.php @@ -97,11 +97,11 @@ class TimestampFormatter implements OutputFormatterInterface { */ public function format($message) { - $timeZone = $this->config->getSystemValue('logtimezone', null); + $timeZone = $this->config->getSystemValue('logtimezone', 'UTC'); $timeZone = $timeZone !== null ? new \DateTimeZone($timeZone) : null; $time = new \DateTime('now', $timeZone); - $timestampInfo = $time->format($this->config->getSystemValue('logdateformat', \DateTime::ISO8601)); + $timestampInfo = $time->format($this->config->getSystemValue('logdateformat', \DateTime::ATOM)); return $timestampInfo . ' ' . $this->formatter->format($message); } diff --git a/lib/private/Log/File.php b/lib/private/Log/File.php index d41ab83c80..be8b72b3a3 100644 --- a/lib/private/Log/File.php +++ b/lib/private/Log/File.php @@ -75,7 +75,7 @@ class File { $config = \OC::$server->getSystemConfig(); // default to ISO8601 - $format = $config->getValue('logdateformat', \DateTime::ISO8601); + $format = $config->getValue('logdateformat', \DateTime::ATOM); $logTimeZone = $config->getValue('logtimezone', 'UTC'); try { $timezone = new \DateTimeZone($logTimeZone);