Commit 0a2c23c1 authored by ValarDragon's avatar ValarDragon
Browse files

Fix CLI bug with start-time being blank

parent e5ee4fd5
Showing with 1 addition and 1 deletion
+1 -1
......@@ -59,7 +59,7 @@ func NewCreateGaugeCmd() *cobra.Command {
return err
}
if timeStr == "" { // empty start time
// do nothing
startTime = time.Unix(0, 0)
} else if timeUnix, err := strconv.ParseInt(timeStr, 10, 64); err == nil { // unix time
startTime = time.Unix(timeUnix, 0)
} else if timeRFC, err := time.Parse(time.RFC3339, timeStr); err == nil { // RFC time
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment