osm-search / Nominatim-Data-Analyser

QA Tool for Nominatim. Helps to improve the OpenStreetMap data quality and therefore the Nominatim search results.
GNU General Public License v2.0
10 stars 3 forks source link

Added the last update date of the database to the layer doc. #22

Closed AntoJvlt closed 2 years ago

AntoJvlt commented 3 years ago

Fixes #17

The last update date of the database is added to the layer doc when generating it. It is extracted from the import_status table of nominatim.

Test cover has also been done for this.

AntoJvlt commented 2 years ago

Maybe @lonvia you could help me a bit on this one please?

The test is not passing because postgres returns the wrong timezone conversion for the date. I don't understand why, since I use a timestamptz entry type and I explicitly set the timezone for postgres to Europe/Paris. Postgres should convert the date back to CEST when it gets fetched no? Is it related to the postgres integration in the workflow?

lonvia commented 2 years ago

The 'SET' command has only an effect on the current connection. You do set a timezone when you insert the test data but when you retrieve the date, the connection is back to the server default (which is UTC).

Given that Nominatim always works with UTC dates, it might be better in any case to always return the UTC timestamp ("SELECT lastimportdate at time zone 'UTC' FROM import_status").

AntoJvlt commented 2 years ago

Oh yes it makes sense thank you 🙏

I thought that the 'SET' command was updating the database configuration. I will use UTC anyways then.