X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/5c55c1d8a15f525bf1c4a17aedbd6f960ad9d3b6..dc52d0954e65d3ed0d0bdca05ff43d8892f704f3:/nominatim/api/status.py diff --git a/nominatim/api/status.py b/nominatim/api/status.py index 61e36cc3..8ac92f35 100644 --- a/nominatim/api/status.py +++ b/nominatim/api/status.py @@ -36,6 +36,12 @@ async def get_status(conn: SearchConnection) -> StatusResult: sql = sa.select(conn.t.import_status.c.lastimportdate).limit(1) status.data_updated = await conn.scalar(sql) + if status.data_updated is not None: + 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: verstr = await conn.get_property('database_version')