mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-07-16 13:47:07 +02:00
Ensure datetime comparison is the same (native vs aware) (#11789)
This commit is contained in:
parent
fc5a926892
commit
926d394b2f
@ -72,9 +72,11 @@ class RecordingExporter(threading.Thread):
|
|||||||
def save_thumbnail(self, id: str) -> str:
|
def save_thumbnail(self, id: str) -> str:
|
||||||
thumb_path = os.path.join(CLIPS_DIR, f"export/{id}.webp")
|
thumb_path = os.path.join(CLIPS_DIR, f"export/{id}.webp")
|
||||||
|
|
||||||
if datetime.datetime.fromtimestamp(self.start_time) < datetime.datetime.now(
|
if datetime.datetime.fromtimestamp(
|
||||||
datetime.timezone.utc
|
self.start_time
|
||||||
).replace(minute=0, second=0, microsecond=0):
|
) < datetime.datetime.now().astimezone(datetime.timezone.utc).replace(
|
||||||
|
minute=0, second=0, microsecond=0
|
||||||
|
):
|
||||||
# has preview mp4
|
# has preview mp4
|
||||||
try:
|
try:
|
||||||
preview: Previews = (
|
preview: Previews = (
|
||||||
|
Loading…
Reference in New Issue
Block a user