diff --git a/PowerPrice/module.php b/PowerPrice/module.php index 8b543cc..b1d1356 100644 --- a/PowerPrice/module.php +++ b/PowerPrice/module.php @@ -262,11 +262,11 @@ private function FetchFromTibber($postalCode) foreach ($energy as $hour) { $date = explode('-', $hour['date']); $result[] = [ - 'start' => mktime($hour['hour'], 0, 0, $date[1], $date[2], $date[0]), - 'end' => mktime($hour['hour'] + 1, 0, 0, $date[1], $date[2], $date[0]), + 'start' => mktime($hour['hour'], 0, 0, intval($date[1]), intval($date[2]), intval($date[0])), + 'end' => mktime($hour['hour'] + 1, 0, 0, intval($date[1]), intval($date[2]), intval($date[0])), 'price' => $hour['priceIncludingVat'], ]; } return json_encode($result); } -} \ No newline at end of file +}