- WIP on Forecast

This commit is contained in:
mcndave committed 2026-10-19 19:22:14 +00:00
1 parent 9c70225a77
commit 29e08c9f5a
1 file changed
+4 -2
+4 -2
View File
@@ -49,7 +49,9 @@ class ApiHandler implements ApiHandlerInterface
if (! empty($json['forecast']) ) { if (! empty($json['forecast']) ) {
foreach($json['forecast'] as &$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) { if ($attribute instanceof Collection) {
@@ -79,4 +81,4 @@ class ApiHandler implements ApiHandlerInterface
{ {
return new \DateTime("@" . strtotime($datetime))->format('Y-m-d H:i:s'); return new \DateTime("@" . strtotime($datetime))->format('Y-m-d H:i:s');
} }
} }