소스 검색

fix sms batch creation

tripeur 2 년 전
부모
커밋
a3460a7fa4
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      app/api/endpoints/project.py

+ 2 - 2
app/api/endpoints/project.py

@@ -1,4 +1,4 @@
-from datetime import timedelta, datetime
+from datetime import timedelta, datetime, timezone
 from uuid import UUID
 
 from fastapi import APIRouter, Depends, HTTPException
@@ -192,7 +192,7 @@ async def create_sms_batch(
     # Get all slots
     slots = session.execute(select(Slot).where(Slot.project_id == project_id))
     sms_list = []
-    now = datetime.now()
+    now = datetime.now(timezone.utc)
     for slot in slots.scalars():
         # Replace the slot placeholder by their value
         slot_content = (