Browse Source

Change date to UTC

pull/855/head
Thomas 3 years ago
parent
commit
7d7934b9de
  1. 10
      apps/api/src/services/data-gathering.service.ts

10
apps/api/src/services/data-gathering.service.ts

@ -377,7 +377,14 @@ export class DataGatheringService {
data: { data: {
dataSource, dataSource,
symbol, symbol,
date: currentDate, date: new Date(
Date.UTC(
getYear(currentDate),
getMonth(currentDate),
getDate(currentDate),
0
)
),
marketPrice: lastMarketPrice marketPrice: lastMarketPrice
} }
}); });
@ -537,6 +544,7 @@ export class DataGatheringService {
await this.prismaService.marketData.groupBy({ await this.prismaService.marketData.groupBy({
_count: true, _count: true,
by: ['symbol'], by: ['symbol'],
orderBy: [{ symbol: 'asc' }],
where: { where: {
date: { gt: startDate } date: { gt: startDate }
} }

Loading…
Cancel
Save