7, 'MonitorId' => 1, 'StartDateTime' => '2026-11-16 10:00:00', 'EndDateTime' => null); } function dbFetchAll($sql, $col = null, $params = array()) { return array(dbFetchOne($sql)); } function ajaxResponse($data = array()) { $GLOBALS['response'] = $data; throw new StopRequest('ok'); } function ajaxError($m) { throw new StopRequest($m); } $entity = $argv[1]; $_REQUEST = array('entity' => $entity, 'id' => '7'); try { include __DIR__.'/../../web/ajax/status.php'; } catch (StopRequest $e) { } $row = ($entity == 'event') ? $GLOBALS['response']['event'] : $GLOBALS['response']['events'][0]; $got = $row['EndDateTimeFormatted']; if ($got === '' and !$deprecations) { echo "ok - $entity: open event has an empty formatted end time\n"; } else { $failures++; echo "FAIL - $entity: got ".var_export($got, true).' '.implode('; ', $deprecations)."\n"; } if ($row['StartDateTimeFormatted'] !== '2026-11-16 10:00:00') { $failures++; echo "FAIL - $entity: start time ".var_export($row['StartDateTimeFormatted'], true)."\n"; } exit($failures ? 1 : 0); }