Browse Source

fixes 2088, for timezones behind UTC, the current code would convert for one day before (local time) when add a day, what would result in the same day after converting back to UTC and thus generating an infinite loop

pull/2332/head
Rafael Claudio 2 years ago
committed by Thomas
parent
commit
02e7125e09
  1. 9
      apps/api/src/services/data-gathering/data-gathering.processor.ts

9
apps/api/src/services/data-gathering/data-gathering.processor.ts

@ -102,14 +102,7 @@ export class DataGatheringProcessor {
}
// Count month one up for iteration
currentDate = new Date(
Date.UTC(
getYear(currentDate),
getMonth(currentDate),
getDate(currentDate) + 1,
0
)
);
currentDate.setDate(currentDate.getDate() + 1);
}
await this.marketDataService.updateMany({ data });

Loading…
Cancel
Save