Skip to content

Commit 1de9838

Browse files
committed
Add fallback to timezone configs
1 parent d8b4c71 commit 1de9838

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app/Services/Logger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function log(Email $message)
2828
'payload' => $message->getBody()->toString(),
2929
'headers' => $this->headersParser->parse($message),
3030
'attachments' => $this->attachmentsParser->parse($message),
31-
'date' => now(config('mail-viewer.timezone', 'UTC'))->toDateTimeString(),
31+
'date' => now(config('mail-viewer.timezone', config('app.timezone', 'UTC')))->toDateTimeString(),
3232
]);
3333
}
3434
}

src/config/mail-viewer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
'middleware' => ['web'],
77
'date_format' => 'd.m.Y',
88
'time_format' => 'H:i:s',
9-
'timezone' => env('APP_TIMEZONE', 'UTC'),
9+
'timezone' => env('MAIL_VIEWER_TIMEZONE', env('APP_TIMEZONE', 'UTC')),
1010
'emails_per_page' => 20,
1111
'prune_older_than_days' => 31,
1212
'site_url' => null,

0 commit comments

Comments
 (0)