Skip to content

Commit

Permalink
Fix issue with statistics for the last 24-hours calculating wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
Quatern1on committed Oct 9, 2023
1 parent f117cdf commit 47fdb76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/Telegram/ChessNowBot.ts
Expand Up @@ -218,7 +218,7 @@ export class ChessNowBot {
const todayUniqueUsers = await UserProfile.count({
where: {
updatedAt: {
[Op.gte]: new Date(new Date().getMilliseconds() - 24 * 60 * 60 * 1000),
[Op.gte]: new Date(new Date().getTime() - 24 * 60 * 60 * 1000),
},
},
});
Expand All @@ -228,7 +228,7 @@ export class ChessNowBot {
const todayGamesPlayed = await PlayedGame.count({
where: {
createdAt: {
[Op.gte]: new Date(new Date().getMilliseconds() - 24 * 60 * 60 * 1000),
[Op.gte]: new Date(new Date().getTime() - 24 * 60 * 60 * 1000),
},
},
});
Expand Down

0 comments on commit 47fdb76

Please sign in to comment.