Fix event only datetime check

This commit is contained in:
Nicolas Mowen 2023-11-06 10:23:45 -07:00 committed by GitHub
parent 591b91194a
commit ea4e40c786
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -270,7 +270,7 @@ class RecordingMaintainer(threading.Thread):
) )
retain_cutoff = datetime.datetime.fromtimestamp( retain_cutoff = datetime.datetime.fromtimestamp(
most_recently_processed_frame_time - pre_capture most_recently_processed_frame_time - pre_capture
) ).astimezone(datetime.timezone.utc)
if end_time < retain_cutoff: if end_time < retain_cutoff:
Path(cache_path).unlink(missing_ok=True) Path(cache_path).unlink(missing_ok=True)
self.end_time_cache.pop(cache_path, None) self.end_time_cache.pop(cache_path, None)