From 6fff4a8947d281d1333a1cc6b5619147378ca900 Mon Sep 17 00:00:00 2001 From: Mina Lee Date: Sun, 9 Nov 2025 02:12:47 +0900 Subject: [PATCH 1/2] fix: mongo timezone error due to encoding --- apps/web/src/api/schedules.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/api/schedules.ts b/apps/web/src/api/schedules.ts index 6117488e..0f7898d2 100644 --- a/apps/web/src/api/schedules.ts +++ b/apps/web/src/api/schedules.ts @@ -56,7 +56,7 @@ export async function updateSchedule(schedule: IScheduleItem): Promise { - const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone + const timezone = encodeURIComponent(Intl.DateTimeFormat().resolvedOptions().timeZone) const res = await fetch(`${SERVER_URL}/v1/schedules/dailyCount?from=${from.toISOString()}&to=${to.toISOString()}&timezone=${timezone}`, { method: 'GET', }) From a51f8e4e61ad4866aaeccbd57f2da92e40074c9e Mon Sep 17 00:00:00 2001 From: Mina Lee Date: Sun, 16 Nov 2025 22:42:22 +0900 Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20=EB=A6=AC=EB=B7=B0=20=EB=B0=98?= =?UTF-8?q?=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/src/api/schedules.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/web/src/api/schedules.ts b/apps/web/src/api/schedules.ts index 0f7898d2..b4ed92d4 100644 --- a/apps/web/src/api/schedules.ts +++ b/apps/web/src/api/schedules.ts @@ -56,8 +56,12 @@ export async function updateSchedule(schedule: IScheduleItem): Promise { - const timezone = encodeURIComponent(Intl.DateTimeFormat().resolvedOptions().timeZone) - const res = await fetch(`${SERVER_URL}/v1/schedules/dailyCount?from=${from.toISOString()}&to=${to.toISOString()}&timezone=${timezone}`, { + const params = new URLSearchParams({ + from: from.toISOString(), + to: to.toISOString(), + timezone: Intl.DateTimeFormat().resolvedOptions().timeZone, + }) + const res = await fetch(`${SERVER_URL}/v1/schedules/dailyCount?${params.toString()}`, { method: 'GET', }) if (!res.ok) {