mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
fix: change from local timezone to UTC when do syncing
This commit is contained in:
parent
38a6d8c813
commit
5faab1d55c
|
@ -106,7 +106,7 @@ func NewEnvironment() *Environment {
|
||||||
// default trade scan time
|
// default trade scan time
|
||||||
syncStartTime: time.Now().AddDate(-1, 0, 0), // defaults to sync from 1 year ago
|
syncStartTime: time.Now().AddDate(-1, 0, 0), // defaults to sync from 1 year ago
|
||||||
sessions: make(map[string]*ExchangeSession),
|
sessions: make(map[string]*ExchangeSession),
|
||||||
startTime: time.Now(),
|
startTime: time.Now().UTC(),
|
||||||
|
|
||||||
syncStatus: SyncNotStarted,
|
syncStatus: SyncNotStarted,
|
||||||
PersistenceServiceFacade: &service.PersistenceServiceFacade{
|
PersistenceServiceFacade: &service.PersistenceServiceFacade{
|
||||||
|
|
|
@ -24,7 +24,7 @@ func (e *KLineBatchQuery) Query(ctx context.Context, symbol string, interval typ
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
T: func(obj interface{}) time.Time {
|
T: func(obj interface{}) time.Time {
|
||||||
return time.Time(obj.(types.KLine).StartTime)
|
return time.Time(obj.(types.KLine).StartTime).UTC()
|
||||||
},
|
},
|
||||||
ID: func(obj interface{}) string {
|
ID: func(obj interface{}) string {
|
||||||
kline := obj.(types.KLine)
|
kline := obj.(types.KLine)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user