diff --git a/pkg/bbgo/config.go b/pkg/bbgo/config.go index b0af22268..9cdb79fc1 100644 --- a/pkg/bbgo/config.go +++ b/pkg/bbgo/config.go @@ -7,7 +7,6 @@ import ( "io/ioutil" "reflect" "runtime" - "time" "github.com/pkg/errors" "gopkg.in/yaml.v3" @@ -167,7 +166,7 @@ type SyncConfig struct { Symbols []string `json:"symbols,omitempty" yaml:"symbols,omitempty"` // Since is the date where you want to start syncing data - Since *time.Time `json:"since,omitempty"` + Since *types.LooseFormatTime `json:"since,omitempty"` } type Config struct { diff --git a/pkg/cmd/sync.go b/pkg/cmd/sync.go index c0e1ff925..c9f0a4fc9 100644 --- a/pkg/cmd/sync.go +++ b/pkg/cmd/sync.go @@ -78,7 +78,7 @@ var SyncCmd = &cobra.Command{ var syncStartTime = defaultSyncStartTime if userConfig.Sync != nil && userConfig.Sync.Since != nil { - syncStartTime = *userConfig.Sync.Since + syncStartTime = userConfig.Sync.Since.Time() } if len(since) > 0 {