Use logtimezone and logdateformat

remotes/origin/handlebars-approach
Joas Schilling 2015-06-23 15:07:07 +07:00
parent 0137a3c5e0
commit d8b9f6ac23
1 changed files with 5 additions and 2 deletions

@ -232,8 +232,11 @@ class Upgrade extends Command {
protected function writeln(OutputInterface $output, $line) {
$t = '';
if($this->showTimestamp) {
$time = new \DateTime();
$t = $time->format(\DateTime::ISO8601) . ' ';
$timeZone = $this->config->getSystemValue('logtimezone', null);
$timeZone = $timeZone !== null ? new \DateTimeZone($timeZone) : null;
$time = new \DateTime('now', $timeZone);
$t = $time->format($this->config->getSystemValue('logdateformat', 'c')) . ' ';
}
$output->writeln($t . $line);
}