mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-09 07:26:48 +00:00
common: remove SimpleTimeFormat const for time package layout const DateTime (#1246)
* switch over to package defined const for time layout * bump appveyor playa * bumperino to latest while setting patherino * whoooops * bump VS version set GOROOT * puge build cache * Revert "puge build cache" This reverts commit 315bb578afc19529457f435e52af2172f5143bc5. * bumperino to test * purge setting of golang directory for version and allow default * purge cache state when file change * whoops * thrasher: nits * don't need to flusherino the cacherino --------- Co-authored-by: Ryan O'Hara-Reid <ryan.oharareid@thrasher.io>
This commit is contained in:
@@ -49,13 +49,13 @@ var commonFlag = []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "start",
|
||||
Usage: "the start date",
|
||||
Value: time.Now().AddDate(0, -1, 0).Format(common.SimpleTimeFormat),
|
||||
Value: time.Now().AddDate(0, -1, 0).Format(time.DateTime),
|
||||
Destination: &taStartTime,
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "end",
|
||||
Usage: "the end date",
|
||||
Value: time.Now().Format(common.SimpleTimeFormat),
|
||||
Value: time.Now().Format(time.DateTime),
|
||||
Destination: &taEndTime,
|
||||
},
|
||||
}
|
||||
@@ -296,11 +296,11 @@ func getTecnicalAnalysis(c *cli.Context, algo string) error {
|
||||
taEndTime, _ = c.Value("end").(string)
|
||||
}
|
||||
|
||||
s, err := time.ParseInLocation(common.SimpleTimeFormat, taStartTime, time.Local)
|
||||
s, err := time.ParseInLocation(time.DateTime, taStartTime, time.Local)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid time format for start: %v", err)
|
||||
}
|
||||
e, err := time.ParseInLocation(common.SimpleTimeFormat, taEndTime, time.Local)
|
||||
e, err := time.ParseInLocation(time.DateTime, taEndTime, time.Local)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid time format for end: %v", err)
|
||||
}
|
||||
@@ -411,11 +411,11 @@ func getBollingerBands(c *cli.Context) error {
|
||||
taEndTime, _ = c.Value("end").(string)
|
||||
}
|
||||
|
||||
s, err := time.ParseInLocation(common.SimpleTimeFormat, taStartTime, time.Local)
|
||||
s, err := time.ParseInLocation(time.DateTime, taStartTime, time.Local)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid time format for start: %v", err)
|
||||
}
|
||||
e, err := time.ParseInLocation(common.SimpleTimeFormat, taEndTime, time.Local)
|
||||
e, err := time.ParseInLocation(time.DateTime, taEndTime, time.Local)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid time format for end: %v", err)
|
||||
}
|
||||
@@ -567,11 +567,11 @@ func getMACD(c *cli.Context) error {
|
||||
taEndTime, _ = c.Value("end").(string)
|
||||
}
|
||||
|
||||
s, err := time.ParseInLocation(common.SimpleTimeFormat, taStartTime, time.Local)
|
||||
s, err := time.ParseInLocation(time.DateTime, taStartTime, time.Local)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid time format for start: %v", err)
|
||||
}
|
||||
e, err := time.ParseInLocation(common.SimpleTimeFormat, taEndTime, time.Local)
|
||||
e, err := time.ParseInLocation(time.DateTime, taEndTime, time.Local)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid time format for end: %v", err)
|
||||
}
|
||||
@@ -707,11 +707,11 @@ func getCoco(c *cli.Context) error {
|
||||
taEndTime, _ = c.Value("end").(string)
|
||||
}
|
||||
|
||||
s, err := time.ParseInLocation(common.SimpleTimeFormat, taStartTime, time.Local)
|
||||
s, err := time.ParseInLocation(time.DateTime, taStartTime, time.Local)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid time format for start: %v", err)
|
||||
}
|
||||
e, err := time.ParseInLocation(common.SimpleTimeFormat, taEndTime, time.Local)
|
||||
e, err := time.ParseInLocation(time.DateTime, taEndTime, time.Local)
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid time format for end: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user