Skip to content

Commit

Permalink
fix CTFd#1949 not add time to all place (CTFd#1951)
Browse files Browse the repository at this point in the history
  • Loading branch information
nella17 authored Jul 18, 2021
1 parent 13e36f8 commit fabdb29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CTFd/admin/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit fabdb29

Please sign in to comment.