Skip to content

Commit 6d8c53e

Browse files
0xb4lintfabpot
authored andcommitted
[Mailer] use microsecond precision SMTP logging
1 parent 3ee7490 commit 6d8c53e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Mailer/Transport/Smtp/Stream/AbstractStream.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ abstract class AbstractStream
3737
public function write(string $bytes, bool $debug = true): void
3838
{
3939
if ($debug) {
40-
$timestamp = date('c');
40+
$timestamp = (new \DateTimeImmutable())->format('Y-m-d\TH:i:s.up');
4141
foreach (explode("\n", trim($bytes)) as $line) {
4242
$this->debug .= \sprintf("[%s] > %s\n", $timestamp, $line);
4343
}
@@ -93,7 +93,7 @@ public function readLine(): string
9393
}
9494
}
9595

96-
$this->debug .= \sprintf('[%s] < %s', date('c'), $line);
96+
$this->debug .= \sprintf('[%s] < %s', (new \DateTimeImmutable())->format('Y-m-d\TH:i:s.up'), $line);
9797

9898
return $line;
9999
}

0 commit comments

Comments
 (0)