From 7038207039f05cb06c471ada147e04ad5f1cb2fc Mon Sep 17 00:00:00 2001 From: BigUstad Date: Wed, 11 Dec 2019 17:33:17 -0800 Subject: [PATCH] Replace Timestamp separator (#3002) Replace time stamp separator to use `-` --- cmd/admin-main.go | 2 ++ cmd/admin-profile-stop.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/admin-main.go b/cmd/admin-main.go index a0b1683f..6cbb3e5f 100644 --- a/cmd/admin-main.go +++ b/cmd/admin-main.go @@ -46,6 +46,8 @@ var adminCmd = cli.Command{ }, } +const dateTimeFormatFilename = "2006-01-02T15-04-05.999999-07-00" + // mainAdmin is the handle for "mc admin" command. func mainAdmin(ctx *cli.Context) error { cli.ShowCommandHelp(ctx, ctx.Args().First()) diff --git a/cmd/admin-profile-stop.go b/cmd/admin-profile-stop.go index e8b447c6..b374c549 100644 --- a/cmd/admin-profile-stop.go +++ b/cmd/admin-profile-stop.go @@ -118,7 +118,7 @@ func mainAdminProfileStop(ctx *cli.Context) error { fi, e := os.Stat(downloadPath) if e == nil && !fi.IsDir() { - e = moveFile(downloadPath, downloadPath+"."+time.Now().Format("2006-01-02T15:04:05.999999-07:00")) + e = moveFile(downloadPath, downloadPath+"."+time.Now().Format(dateTimeFormatFilename)) fatalIf(probe.NewError(e), "Unable to create a backup of profile.zip") } else { if !os.IsNotExist(e) {