Skip to content

Commit fc6bfc0

Browse files
committed
fix: correct timestamp formatting in DiscordHandler
1 parent f774d1d commit fc6bfc0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/DiscordHandler.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
namespace renslabs\LoggerDiscordChannel;
44

55
use GuzzleHttp\RequestOptions;
6-
use Monolog\Formatter\LineFormatter;
76
use Monolog\Handler\AbstractProcessingHandler;
87
use Monolog\LogRecord;
98
use Psr\Log\LogLevel;
10-
use Carbon\Carbon;
9+
use DateTimeZone;
1110
use Illuminate\Support\Str;
1211

1312
class DiscordHandler extends AbstractProcessingHandler
@@ -356,7 +355,7 @@ private function buildEmbeds(LogRecord $record, array $logInfo, array $fields):
356355
'title' => $this->buildTitle($logInfo),
357356
'description' => $this->buildDescription($record),
358357
'color' => $logInfo['color'],
359-
'timestamp' => $record->datetime->setTimezone(new DateTimeZone($this->timezone))->format('Y-m-d\TH:i:s.vP')
358+
'timestamp' => $record->datetime->setTimezone(new DateTimeZone($this->timezone))->format('Y-m-d\TH:i:s.vP'),
360359
'fields' => $fields,
361360
'footer' => [
362361
'text' => $this->suffix . ' • Laravel Discord Logger',

0 commit comments

Comments
 (0)