Permalink
Browse files

use proper iso date format

php constants are liars
  • Loading branch information...
icewind1991 committed Jan 31, 2017
1 parent c0eb04d commit 13a31181a6d72d084797a71f49f2c5edee8c8dae
Showing with 3 additions and 3 deletions.
  1. +1 −1 lib/Controller/LogController.php
  2. +2 −2 lib/Log/LogIterator.php
@@ -48,7 +48,7 @@ public function __construct($appName,
}
private function getLogIterator() {
$dateFormat = $this->config->getSystemValue('logdateformat', \DateTime::ISO8601);
$dateFormat = $this->config->getSystemValue('logdateformat', \DateTime::ATOM);
$logClasses = ['\OC\Log\Owncloud', '\OC_Log_Owncloud', '\OC\Log\File'];
foreach ($logClasses as $logClass) {
if (class_exists($logClass)) {
View
@@ -70,9 +70,9 @@ function rewind() {
function current() {
$entry = json_decode($this->lastLine, true);
if ($this->dateFormat !== \DateTime::ISO8601) {
if ($this->dateFormat !== \DateTime::ATOM) {
$time = \DateTime::createFromFormat($this->dateFormat, $entry['time']);
$entry['time'] = $time->format(\DateTime::ISO8601);
$entry['time'] = $time->format(\DateTime::ATOM);
}
return $entry;
}

0 comments on commit 13a3118

Please sign in to comment.