X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/8c7140d92b7a679ae5ef5bb3655c69bd39b7dfeb..28f7e51279e8ffa7eba2d1e3ff6541940eb0e6f5:/nominatim/api/status.py?ds=sidebyside diff --git a/nominatim/api/status.py b/nominatim/api/status.py index adccf7a5..8ac92f35 100644 --- a/nominatim/api/status.py +++ b/nominatim/api/status.py @@ -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: