Permalink
Browse files

Merge pull request #127 from ekino/force_timezone

Save some I/O
  • Loading branch information...
2 parents 023b31a + 5e0fabe commit 38bb472abb27db138536f845f7d259c1c47bbd3f @Seldaek committed Oct 24, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/Monolog/Logger.php
@@ -191,7 +191,7 @@ public function addRecord($level, $message, array $context = array())
'level' => $level,
'level_name' => static::getLevelName($level),
'channel' => $this->name,
- 'datetime' => \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)))->setTimeZone(static::$timezone),
+ 'datetime' => \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)), static::$timezone)->setTimezone(static::$timezone),
'extra' => array(),
);
// check if any handler will handle this message
@@ -339,7 +339,7 @@ public function isHandling($level)
'level' => $level,
'level_name' => static::getLevelName($level),
'channel' => $this->name,
- 'datetime' => new \DateTime(),
+ 'datetime' => new \DateTime('now', static::$timezone),
'extra' => array(),
);

0 comments on commit 38bb472

Please sign in to comment.