service: fix FindMissingTimeRanges until check

This commit is contained in:
c9s 2022-06-06 18:15:36 +08:00
parent 6c6d5a27a8
commit b32b852303
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -417,7 +417,7 @@ func (s *BacktestService) FindMissingTimeRanges(ctx context.Context, ex types.Ex
lastTime = t lastTime = t
} }
if lastTime.Before(until) && until.Sub(lastTime) > intervalDuration*2 { if lastTime.Before(until) && until.Sub(lastTime) > intervalDuration {
timeRanges = append(timeRanges, TimeRange{ timeRanges = append(timeRanges, TimeRange{
Start: lastTime, Start: lastTime,
End: until, End: until,