Normalize media dates for sorting

This commit is contained in:
hbrain 2026-05-26 10:03:09 +00:00
parent 5a69a31e89
commit fa4c6dd95f

View file

@ -440,6 +440,8 @@ def media_date(path: Path) -> datetime:
dt = media_embedded_date(path)
if dt is None:
dt = datetime.fromtimestamp(path.stat().st_mtime)
if dt.tzinfo is not None:
dt = dt.astimezone().replace(tzinfo=None)
return dt