From 86bbe2c31a95ca92016f7e100df30f773db0651b Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Mon, 19 Oct 2026 19:22:14 +0000 Subject: [PATCH] - WIP on Forecast --- src/ApiHandler.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ApiHandler.php b/src/ApiHandler.php index 64a613c..e34307d 100644 --- a/src/ApiHandler.php +++ b/src/ApiHandler.php @@ -49,7 +49,9 @@ class ApiHandler implements ApiHandlerInterface if (! empty($json['forecast']) ) { foreach($json['forecast'] as &$forecast) { - $forecast['date'] = $this->adjustTimezone($forecast['date']); + if ($forecast['date'] ?? false) { + $forecast['date'] = $this->adjustTimezone($forecast['date']); + } } if ($attribute instanceof Collection) { @@ -79,4 +81,4 @@ class ApiHandler implements ApiHandlerInterface { return new \DateTime("@" . strtotime($datetime))->format('Y-m-d H:i:s'); } -} \ No newline at end of file +}