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)