Skip to content

Commit b34fd8c

Browse files
authored
Fix parse string to int
1 parent 914fd4b commit b34fd8c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

PowerPrice/module.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,11 +262,11 @@ private function FetchFromTibber($postalCode)
262262
foreach ($energy as $hour) {
263263
$date = explode('-', $hour['date']);
264264
$result[] = [
265-
'start' => mktime($hour['hour'], 0, 0, $date[1], $date[2], $date[0]),
266-
'end' => mktime($hour['hour'] + 1, 0, 0, $date[1], $date[2], $date[0]),
265+
'start' => mktime($hour['hour'], 0, 0, intval($date[1]), intval($date[2]), intval($date[0])),
266+
'end' => mktime($hour['hour'] + 1, 0, 0, intval($date[1]), intval($date[2]), intval($date[0])),
267267
'price' => $hour['priceIncludingVat'],
268268
];
269269
}
270270
return json_encode($result);
271271
}
272-
}
272+
}

0 commit comments

Comments
 (0)