Fixed incorrect timezone in heartbeats

This commit is contained in:
Filip Znachor 2023-11-03 00:20:35 +01:00
parent 6b9f1cccb0
commit f547207e1d

View file

@ -26,10 +26,16 @@ class Monitor {
$opts = $s->cfg("monitor_options") ?? [];
$opt = $opts[$id] ?? [];
$heartbeats = [];
foreach ($heartbeat["heartbeatList"][$id] as $beat) {
$beat["time"] = strtotime($beat["time"]);
array_push($heartbeats, $beat);
}
return new Monitor(
$oldMonitor["name"],
$heartbeat["uptimeList"][$id . "_24"],
$heartbeat["heartbeatList"][$id],
$heartbeats,
$opt
);
}