Skip to content

Commit

Permalink
Fix parse string to int
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunnyka98 authored Oct 21, 2024
1 parent 914fd4b commit b34fd8c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PowerPrice/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

0 comments on commit b34fd8c

Please sign in to comment.