From 01af21f8562dd32f1925dd5103a1975ee4c4ed0b Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Sat, 11 Feb 2023 13:44:16 +0100 Subject: [PATCH] Use year/date in the backup snapshot zip filename instead of epoch seconds (#1377 #1407) --- changedetectionio/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/changedetectionio/__init__.py b/changedetectionio/__init__.py index 92994482..053b8bd7 100644 --- a/changedetectionio/__init__.py +++ b/changedetectionio/__init__.py @@ -1001,7 +1001,8 @@ def changedetection_app(config=None, datastore_o=None): os.unlink(previous_backup_filename) # create a ZipFile object - backupname = "changedetection-backup-{}.zip".format(int(time.time())) + timestamp = datetime.datetime.now().strftime("%Y%m%d%H%M%S") + backupname = "changedetection-backup-{}.zip".format(timestamp) backup_filepath = os.path.join(datastore_o.datastore_path, backupname) with zipfile.ZipFile(backup_filepath, "w",