# Copyright (C) 2023 by the Nominatim developer community.
# For a full list of authors see the git log.
"""
-Classes and function releated to status call.
+Classes and function related to status call.
"""
from typing import Optional
import datetime as dt
status.data_updated = await conn.scalar(sql)
if status.data_updated is not None:
- status.data_updated = status.data_updated.replace(tzinfo=dt.timezone.utc)
+ if status.data_updated.tzinfo is None:
+ status.data_updated = status.data_updated.replace(tzinfo=dt.timezone.utc)
+ else:
+ status.data_updated = status.data_updated.astimezone(dt.timezone.utc)
# Database version
try: