Add time to export filename (#1949)

* Add time to export filename
This commit is contained in:
Allen Guan
2021-07-18 04:12:47 +08:00
committed by GitHub
parent 327d280702
commit 551efe2417

View File

@@ -19,7 +19,7 @@ with app.app_context():
shutil.copyfileobj(backup, target) shutil.copyfileobj(backup, target)
else: else:
ctf_name = config.ctf_name() ctf_name = config.ctf_name()
day = datetime.datetime.now().strftime("%Y-%m-%d") day = datetime.datetime.now().strftime("%Y-%m-%d_%T")
full_name = "{}.{}.zip".format(ctf_name, day) full_name = "{}.{}.zip".format(ctf_name, day)
with open(full_name, "wb") as target: with open(full_name, "wb") as target: