1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-23 17:46:09 +02:00

Improve build

This commit is contained in:
Jordi Boggiano
2020-12-09 14:22:04 +01:00
parent bd9570d835
commit c5853b9b0f
27 changed files with 127 additions and 72 deletions

View File

@@ -118,7 +118,7 @@ class MongoDBFormatter implements FormatterInterface
private function getMongoDbDateTime(\DateTimeInterface $value): UTCDateTime
{
return new UTCDateTime((int) (string) floor($value->format('U.u') * 1000));
return new UTCDateTime((int) floor(((float) $value->format('U.u')) * 1000));
}
/**
@@ -130,7 +130,7 @@ class MongoDBFormatter implements FormatterInterface
*/
private function legacyGetMongoDbDateTime(\DateTimeInterface $value): UTCDateTime
{
$milliseconds = floor($value->format('U.u') * 1000);
$milliseconds = floor(((float) $value->format('U.u')) * 1000);
$milliseconds = (PHP_INT_SIZE == 8) //64-bit OS?
? (int) $milliseconds