Replace Timestamp separator (#3002)
Replace time stamp separator to use `-`
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user