mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-08-04 01:02:27 -04:00
The mp4 is written as the event records, so its mtime is when recording finished, not when it started. Set EndDateTime to the mtime and StartDateTime to duration seconds before it, so Length agrees with EndDateTime - StartDateTime. The directory mtime fallback also ran unconditionally after both branches, overwriting the times just computed and the Deep-scheme path-derived start. Only use it when there are neither capture jpgs nor an mp4. Adds t/event_recover_timestamps.t, which builds a 3 second mp4 with ffmpeg and checks the recovered times against its mtime. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BV1gDc9T6D6H8gtTcxwLvk