X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/75a77810d1248d21f40f6207d31e032694410b7a..50352c634da0b44bd595a278406cd9654ce94d86:/nominatim/api/status.py diff --git a/nominatim/api/status.py b/nominatim/api/status.py index adccf7a5..1069184c 100644 --- a/nominatim/api/status.py +++ b/nominatim/api/status.py @@ -5,7 +5,7 @@ # 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 @@ -37,7 +37,10 @@ async def get_status(conn: SearchConnection) -> StatusResult: 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: