mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
Merge pull request #654 from zenixls2/fix/UTC
fix: change from local timezone to UTC when do kline synchronization
This commit is contained in:
commit
396accbf55
|
@ -106,7 +106,7 @@ func NewEnvironment() *Environment {
|
|||
// default trade scan time
|
||||
syncStartTime: time.Now().AddDate(-1, 0, 0), // defaults to sync from 1 year ago
|
||||
sessions: make(map[string]*ExchangeSession),
|
||||
startTime: time.Now(),
|
||||
startTime: time.Now().UTC(),
|
||||
|
||||
syncStatus: SyncNotStarted,
|
||||
PersistenceServiceFacade: &service.PersistenceServiceFacade{
|
||||
|
|
|
@ -24,7 +24,7 @@ func (e *KLineBatchQuery) Query(ctx context.Context, symbol string, interval typ
|
|||
})
|
||||
},
|
||||
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 {
|
||||
kline := obj.(types.KLine)
|
||||
|
|
Loading…
Reference in New Issue
Block a user