Files
Matt Fiscus bdadea3cd1 Fixed timezone issue
Found an issue where timezone could be incorrect in api if server admin changes server timezeone to localtime instead of UTC.
2023-11-28 17:32:08 -07:00

19 lines
428 B
PHP

<?php
$ReflectorStatus = (file_exists($Service['PIDFile'])) ? 'up' : 'down';
$payload = array(
'lastupdate' => gmdate('U', time()),
'lasturfdupdate' => gmdate('U', filemtime($Service['XMLFile'])),
'reflectorstatus' => $ReflectorStatus,
'reflectoruptimeseconds' => $Reflector->GetServiceUptime()
);
// json encode payload array
$records = json_encode($payload);
echo $records;
?>