Ensure export thumbnail datetime is UTC (#11786)

This commit is contained in:
Josh Hawkins 2024-06-06 14:18:42 -05:00 committed by GitHub
parent d2787d4308
commit fc5a926892
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -72,11 +72,9 @@ 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( if datetime.datetime.fromtimestamp(self.start_time) < datetime.datetime.now(
self.start_time datetime.timezone.utc
) < datetime.datetime.now().astimezone(datetime.timezone.dst).replace( ).replace(minute=0, second=0, microsecond=0):
minute=0, second=0, microsecond=0
):
# has preview mp4 # has preview mp4
try: try:
preview: Previews = ( preview: Previews = (