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 = (