mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-06 05:07:36 +02:00
Fix mongodb formatter
This commit is contained in:
@@ -102,13 +102,6 @@ class MongoDBFormatter implements FormatterInterface
|
||||
|
||||
protected function formatDate(\DateTimeInterface $value, $nestingLevel)
|
||||
{
|
||||
$seconds = (int) $value->format('U');
|
||||
$milliseconds = (int) $value->format('u') / 1000;
|
||||
|
||||
if ($seconds < 0) {
|
||||
return new UTCDateTime($seconds * 1000 - $milliseconds);
|
||||
} else {
|
||||
return new UTCDateTime($seconds * 1000 + $milliseconds);
|
||||
}
|
||||
return new UTCDateTime((int) ($value->format('U.u') * 1000));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user