From 1a9de54d813bd9692988b16f94a5b5f897a0eb1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Canek=20Pel=C3=A1ez=20Vald=C3=A9s?= Date: Sun, 21 Nov 2021 01:07:08 -0600 Subject: [PATCH] Default date is file modification date, not now. --- fotos/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fotos/util.py b/fotos/util.py index 05084a3..741bdf6 100644 --- a/fotos/util.py +++ b/fotos/util.py @@ -228,7 +228,7 @@ def get_image_metadata(path): if DATE_TIME in metadata: dt = metadata.get(DATE_TIME).value else: - dt = datetime.now() + dt = datetime.fromtimestamp(os.path.getmtime(path)) md['timestamp'] = datetime(dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second, dt.microsecond, tz) if SUBJECT in metadata: -- GitLab