Files
FusionAGI/fusionagi/_time.py
defiQUG c052b07662
Some checks failed
Tests / test (3.10) (push) Has been cancelled
Tests / test (3.11) (push) Has been cancelled
Tests / test (3.12) (push) Has been cancelled
Tests / lint (push) Has been cancelled
Tests / docker (push) Has been cancelled
Initial commit: add .gitignore and README
2026-02-09 21:51:42 -08:00

14 lines
393 B
Python

"""Shared time utilities; timezone-aware UTC to avoid deprecated datetime.utcnow."""
from datetime import datetime, timezone
def utc_now() -> datetime:
"""Return current UTC time (timezone-aware). Prefer over datetime.utcnow()."""
return datetime.now(timezone.utc)
def utc_now_iso() -> str:
"""Return current UTC time as ISO format string."""
return utc_now().isoformat()