diff --git a/src/Logs/HorizonLog.php b/src/Logs/HorizonLog.php index 4e37cf56..080a5ad4 100644 --- a/src/Logs/HorizonLog.php +++ b/src/Logs/HorizonLog.php @@ -20,7 +20,7 @@ class HorizonLog extends Log protected function fillMatches(array $matches = []): void { $datetime = $this->parseDateTime($matches['datetime'] ?? null); - $timezone = config('log-viewer.timezone', config('app.timezone', 'UTC')); + $timezone = config('log-viewer.timezone', config('app.timezone', 'UTC')) ?? 'UTC'; $this->datetime = $datetime?->setTimezone($timezone); $this->level = $matches['level']; diff --git a/src/Logs/HorizonOldLog.php b/src/Logs/HorizonOldLog.php index 63072338..a714e4f2 100644 --- a/src/Logs/HorizonOldLog.php +++ b/src/Logs/HorizonOldLog.php @@ -19,7 +19,7 @@ class HorizonOldLog extends Log protected function fillMatches(array $matches = []): void { $datetime = static::parseDateTime($matches['datetime'] ?? null); - $timezone = config('log-viewer.timezone', config('app.timezone', 'UTC')); + $timezone = config('log-viewer.timezone', config('app.timezone', 'UTC')) ?? 'UTC'; $this->datetime = $datetime?->setTimezone($timezone); $this->level = $matches['level']; diff --git a/src/Logs/HttpAccessLog.php b/src/Logs/HttpAccessLog.php index ad5b406b..dc9f8765 100644 --- a/src/Logs/HttpAccessLog.php +++ b/src/Logs/HttpAccessLog.php @@ -35,7 +35,7 @@ protected function fillMatches(array $matches = []): void ]; $datetime = static::parseDateTime($matches['datetime'] ?? null); - $timezone = config('log-viewer.timezone', config('app.timezone', 'UTC')); + $timezone = config('log-viewer.timezone', config('app.timezone', 'UTC')) ?? 'UTC'; $this->datetime = $datetime?->setTimezone($timezone); $this->level = $matches['status_code'] ?? null; diff --git a/src/Logs/HttpApacheErrorLog.php b/src/Logs/HttpApacheErrorLog.php index 7dcb0717..c4932541 100644 --- a/src/Logs/HttpApacheErrorLog.php +++ b/src/Logs/HttpApacheErrorLog.php @@ -15,7 +15,7 @@ class HttpApacheErrorLog extends Log protected function fillMatches(array $matches = []): void { $datetime = static::parseDateTime($matches['datetime'] ?? null); - $timezone = config('log-viewer.timezone', config('app.timezone', 'UTC')); + $timezone = config('log-viewer.timezone', config('app.timezone', 'UTC')) ?? 'UTC'; $this->datetime = $datetime?->setTimezone($timezone); $this->level = $matches['level'] ?? null; diff --git a/src/Logs/HttpNginxErrorLog.php b/src/Logs/HttpNginxErrorLog.php index 6b43f9bc..4e4e1fc6 100644 --- a/src/Logs/HttpNginxErrorLog.php +++ b/src/Logs/HttpNginxErrorLog.php @@ -15,7 +15,7 @@ class HttpNginxErrorLog extends Log protected function fillMatches(array $matches = []): void { $datetime = static::parseDateTime($matches['datetime'] ?? null); - $timezone = config('log-viewer.timezone', config('app.timezone', 'UTC')); + $timezone = config('log-viewer.timezone', config('app.timezone', 'UTC')) ?? 'UTC'; $this->datetime = $datetime?->setTimezone($timezone); $this->level = $matches['level'] ?? null; diff --git a/src/Logs/Log.php b/src/Logs/Log.php index 60a1e9b5..203c12e9 100644 --- a/src/Logs/Log.php +++ b/src/Logs/Log.php @@ -105,7 +105,7 @@ protected function parseText(array &$matches = []): void protected function fillMatches(array $matches = []): void { $datetime = static::parseDateTime($matches['datetime'] ?? null); - $timezone = config('log-viewer.timezone', config('app.timezone', 'UTC')); + $timezone = config('log-viewer.timezone', config('app.timezone', 'UTC')) ?? 'UTC'; $this->datetime = $datetime?->setTimezone($timezone); $this->level = $matches[static::$regexLevelKey] ?? null;