Skip to content

Commit c7aaa56

Browse files
Fix pre-1970 timestamps
1 parent 0724d45 commit c7aaa56

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Monolog/BreadcrumbHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected function write($record): void
5656
{
5757
$datetime = $record['datetime'] ?? null;
5858
$timestamp = $datetime instanceof \DateTimeInterface
59-
? (float) ($datetime->format('U.u'))
59+
? $datetime->getTimestamp() + (int) $datetime->format('u') / 1000000
6060
: null;
6161

6262
$breadcrumb = new Breadcrumb(

0 commit comments

Comments
 (0)