From 9fc22efa2d57459f03a46c8960169a65e9a85727 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 29 May 2024 14:55:56 -0600 Subject: [PATCH] Always save previews in UTC offset (#11629) --- frigate/output/preview.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frigate/output/preview.py b/frigate/output/preview.py index c64591b6eb..7b89a07e04 100644 --- a/frigate/output/preview.py +++ b/frigate/output/preview.py @@ -180,6 +180,7 @@ def __init__(self, config: CameraConfig) -> None: # end segment at end of hour self.segment_end = ( (datetime.datetime.now() + datetime.timedelta(hours=1)) + .astimezone(datetime.timezone.utc) .replace(minute=0, second=0, microsecond=0) .timestamp() ) @@ -192,6 +193,7 @@ def __init__(self, config: CameraConfig) -> None: # check for existing items in cache start_ts = ( datetime.datetime.now() + .astimezone(datetime.timezone.utc) .replace(minute=0, second=0, microsecond=0) .timestamp() ) @@ -300,6 +302,7 @@ def write_data( # reset frame cache self.segment_end = ( (datetime.datetime.now() + datetime.timedelta(hours=1)) + .astimezone(datetime.timezone.utc) .replace(minute=0, second=0, microsecond=0) .timestamp() )