Milestone 1.

This commit is contained in:
2025-08-18 20:14:56 +02:00
parent 9d1623c739
commit 1646d7b827
23 changed files with 1684 additions and 1275 deletions

19
app/utils/time.py Normal file
View File

@@ -0,0 +1,19 @@
from __future__ import annotations
from datetime import datetime, timezone
def now_iso_utc() -> str:
return datetime.now(timezone.utc).replace(microsecond=0).isoformat().replace("+00:00", "Z")
def is_iso_utc(value: str) -> bool:
try:
# Accept the 'Z' suffix
if value.endswith("Z"):
datetime.fromisoformat(value.replace("Z", "+00:00"))
else:
datetime.fromisoformat(value)
return True
except Exception:
return False