Normalize media dates for sorting
This commit is contained in:
parent
5a69a31e89
commit
fa4c6dd95f
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue