diff --git a/src/common/model/player/impl/scoresaber-player.ts b/src/common/model/player/impl/scoresaber-player.ts index 3e700d0..7b8eb18 100644 --- a/src/common/model/player/impl/scoresaber-player.ts +++ b/src/common/model/player/impl/scoresaber-player.ts @@ -108,7 +108,7 @@ export async function getScoreSaberPlayerFromToken( const date = getMidnightAlignedDate(getDaysAgoDate(daysAgo)); daysAgo += 1; // Increment daysAgo for each earlier rank - statisticHistory[date.toString()] = { + statisticHistory[formatDateMinimal(date)] = { rank: rank, }; } diff --git a/src/common/schema/player-schema.ts b/src/common/schema/player-schema.ts index 3ec91b2..787ae63 100644 --- a/src/common/schema/player-schema.ts +++ b/src/common/schema/player-schema.ts @@ -115,7 +115,7 @@ PlayerSchema.methods.sortStatisticHistory = function (): Map< Date.parse(b[0]) - Date.parse(a[0]), ) // Convert the date strings back to Date objects for the resulting Map - .map(([date, history]) => [new Date(date).toUTCString(), history]), + .map(([date, history]) => [formatDateMinimal(new Date(date)), history]), ); return this.statisticHistory; };