We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36dde5e commit af921f2Copy full SHA for af921f2
src/repositories/leaderboard.repository.ts
@@ -84,7 +84,11 @@ export class LeaderboardRepository {
84
85
// 오늘 날짜와 기준 날짜의 통계를 가져오는 CTE(임시 결과 집합) 쿼리 빌드
86
private buildLeaderboardCteQuery(dateRange: number, pastDateKST?: string) {
87
- const nowDateKST = getCurrentKSTDateString();
+ // KST 기준 00시~01시 (UTC 15:00~16:00) 사이라면 전날 데이터를 사용
88
+ const nowDateKST = new Date().getUTCHours() === 15
89
+ ? getKSTDateStringWithOffset(-24 * 60) // 전날 데이터
90
+ : getCurrentKSTDateString();
91
+
92
if (!pastDateKST) {
93
pastDateKST = getKSTDateStringWithOffset(-dateRange * 24 * 60);
94
}
0 commit comments