From fc5a926892ab4183eebaf82920a9cedf5bed42a1 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Thu, 6 Jun 2024 14:18:42 -0500 Subject: [PATCH] Ensure export thumbnail datetime is UTC (#11786) --- frigate/record/export.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/frigate/record/export.py b/frigate/record/export.py index 6e30656d4..fe4cf9316 100644 --- a/frigate/record/export.py +++ b/frigate/record/export.py @@ -72,11 +72,9 @@ class RecordingExporter(threading.Thread): def save_thumbnail(self, id: str) -> str: thumb_path = os.path.join(CLIPS_DIR, f"export/{id}.webp") - if datetime.datetime.fromtimestamp( - self.start_time - ) < datetime.datetime.now().astimezone(datetime.timezone.dst).replace( - minute=0, second=0, microsecond=0 - ): + if datetime.datetime.fromtimestamp(self.start_time) < datetime.datetime.now( + datetime.timezone.utc + ).replace(minute=0, second=0, microsecond=0): # has preview mp4 try: preview: Previews = (