Revert unintentional log timestamp format change

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2017-01-30 15:06:23 +01:00
parent 64e9a1aec0
commit 0a837ac64e
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
2 changed files with 3 additions and 3 deletions

View File

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

View File

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