From 11ad64f6cbdc489a49247604fe697dffaa090ac2 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Mon, 29 May 2017 16:51:30 -0400 Subject: [PATCH] backup: use datetime string as default archive name Because unix timestamp is not very human readable. --- cmd/backup.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/backup.go b/cmd/backup.go index 5cd9142fb..ffc9afbcb 100644 --- a/cmd/backup.go +++ b/cmd/backup.go @@ -33,7 +33,7 @@ portable among all supported database engines.`, boolFlag("verbose, v", "Show process details"), stringFlag("tempdir, t", os.TempDir(), "Temporary directory path"), stringFlag("target", "./", "Target directory path to save backup archive"), - stringFlag("archive-name", fmt.Sprintf("gogs-backup-%d.zip", time.Now().Unix()), "Name of backup archive"), + stringFlag("archive-name", fmt.Sprintf("gogs-backup-%s.zip", time.Now().Format("20060102150405")), "Name of backup archive"), boolFlag("database-only", "Only dump database"), boolFlag("exclude-repos", "Exclude repositories"), },