From d7a649809fd635417f1d00dc3732a273be6d36f0 Mon Sep 17 00:00:00 2001 From: hbyang Date: Fri, 6 Mar 2026 14:43:10 +0900 Subject: [PATCH] =?UTF-8?q?=EC=97=85=EB=A1=9C=EB=93=9C=20=EC=8B=9C?= =?UTF-8?q?=EA=B0=84=20=EC=88=98=EC=A0=95=20.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/social/api/routers/v1/upload.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/social/api/routers/v1/upload.py b/app/social/api/routers/v1/upload.py index a6272d0..cdf667c 100644 --- a/app/social/api/routers/v1/upload.py +++ b/app/social/api/routers/v1/upload.py @@ -178,8 +178,11 @@ async def upload_to_social( ) # 6. 백그라운드 태스크 등록 (즉시 업로드 or 예약 없을 때만) - from app.utils.timezone import now as utcnow - is_scheduled = body.scheduled_at and body.scheduled_at > utcnow().replace(tzinfo=None) + # scheduled_at은 naive datetime (클라이언트에서 KST 기준으로 전송) + # config의 TIMEZONE(KST) 기준 현재 시간과 비교 + from config import TIMEZONE + now_kst_naive = datetime.now(TIMEZONE).replace(tzinfo=None) + is_scheduled = body.scheduled_at and body.scheduled_at > now_kst_naive if not is_scheduled: background_tasks.add_task(process_social_upload, social_upload.id)