diff --git a/src/kbo/game-detail.ts b/src/kbo/game-detail.ts index 1a2908d..20709c8 100644 --- a/src/kbo/game-detail.ts +++ b/src/kbo/game-detail.ts @@ -1,3 +1,4 @@ +import { todayKst } from "../types/dateString"; import { stripTags, decodeHtmlEntities } from "./html-utils"; import { LeagueCode, LEAGUE_CODES } from "./game-list"; import { SERIES_ID } from "./schedule"; @@ -769,12 +770,8 @@ function isGameDateInFuture(gameId: string): boolean { const m = gameId.match(/^(\d{4})(\d{2})(\d{2})/); if (!m) return false; const gameDate = `${m[1]}-${m[2]}-${m[3]}`; - const nowKst = new Date(Date.now() + 9 * 60 * 60 * 1000); - const today = - `${nowKst.getUTCFullYear()}-` + - `${String(nowKst.getUTCMonth() + 1).padStart(2, "0")}-` + - `${String(nowKst.getUTCDate()).padStart(2, "0")}`; - return gameDate > today; + // 서버 로컬시간 = KST(.env의 TZ=Asia/Seoul)이므로 기존 KST 헬퍼로 충분. + return gameDate > todayKst(); } // ── 5. 통합 GameDetail ──