mirror of
https://github.com/blackboxprogramming/BlackRoad-Operating-System.git
synced 2026-03-17 01:57:11 -05:00
Use timezone-aware timestamps and update tests
This commit is contained in:
9
backend/app/utils/datetime.py
Normal file
9
backend/app/utils/datetime.py
Normal file
@@ -0,0 +1,9 @@
|
||||
"""Datetime utilities."""
|
||||
|
||||
from datetime import datetime, timezone
|
||||
|
||||
|
||||
def utc_now() -> datetime:
|
||||
"""Return a timezone-aware UTC datetime."""
|
||||
return datetime.now(timezone.utc)
|
||||
|
||||
Reference in New Issue
Block a user