mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
config: use looseFormatTime type for since field
This commit is contained in:
parent
ab07768a6d
commit
cfc17acd20
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user