From fabdb291e286554df09d57a4a855beba6b2394f0 Mon Sep 17 00:00:00 2001 From: Allen Guan Date: Sun, 18 Jul 2021 16:14:09 +0800 Subject: [PATCH] fix #1949 not add time to all place (#1951) --- CTFd/admin/__init__.py | 2 +- manage.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CTFd/admin/__init__.py b/CTFd/admin/__init__.py index fe40cc82..2ff77721 100644 --- a/CTFd/admin/__init__.py +++ b/CTFd/admin/__init__.py @@ -110,7 +110,7 @@ def import_ctf(): def export_ctf(): backup = export_ctf_util() ctf_name = ctf_config.ctf_name() - day = datetime.datetime.now().strftime("%Y-%m-%d") + day = datetime.datetime.now().strftime("%Y-%m-%d_%T") full_name = u"{}.{}.zip".format(ctf_name, day) return send_file( backup, cache_timeout=-1, as_attachment=True, attachment_filename=full_name diff --git a/manage.py b/manage.py index e061d9cd..7013d050 100644 --- a/manage.py +++ b/manage.py @@ -61,7 +61,7 @@ def export_ctf(path=None): shutil.copyfileobj(backup, target) else: name = ctf_name() - day = datetime.datetime.now().strftime("%Y-%m-%d") + day = datetime.datetime.now().strftime("%Y-%m-%d_%T") full_name = f"{name}.{day}.zip" with open(full_name, "wb") as target: