Files
Isaac Connor 7b9c1ee1d2 fix: derive event end time from Length when EndDateTime is missing
When zmc is killed or crashes without writing EndDateTime, three code
paths invent a fake end of NOW(), so an event from hours ago appears to
extend across the entire down-time. Montage review then paints a bar
that makes it look like recorded video exists where it doesn't.

Length is flushed to the DB every few seconds during recording, so even
crashed events have an accurate last-known duration. Fall back to
StartDateTime + Length when EndDateTime IS NULL, and only fall back to
NOW() when Length is also 0 (event has no recorded data yet).

- web/api/app/Model/Event.php: EndTimeSecs and EndTime virtual fields,
  which is what the montagereview JS actually reads via the API.
- web/ajax/events.php: same fix in the AJAX events list SQL.
- web/skins/classic/views/montagereview.php: \$eventsSql kept in sync
  even though it is no longer executed directly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 06:46:01 -04:00
..
2021-02-02 23:19:52 -05:00
2019-12-20 14:56:14 -05:00
2018-03-13 22:28:38 -04:00
2014-11-15 19:03:40 +00:00
2016-05-02 10:41:25 -04:00
2023-02-26 17:04:05 -05:00
2018-05-07 14:09:05 -07:00
2023-11-03 13:33:28 -04:00
2020-09-10 13:31:39 -04:00