diff --git a/pkg/bbgo/environment.go b/pkg/bbgo/environment.go index aca20eefb..e60544c7c 100644 --- a/pkg/bbgo/environment.go +++ b/pkg/bbgo/environment.go @@ -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{ diff --git a/pkg/exchange/batch/kline.go b/pkg/exchange/batch/kline.go index 30ef7b767..b680c8143 100644 --- a/pkg/exchange/batch/kline.go +++ b/pkg/exchange/batch/kline.go @@ -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)