Closed AntoJvlt closed 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?
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"
).
Oh yes it makes sense thank you 🙏
I thought that the 'SET' command was updating the database configuration. I will use UTC anyways then.
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.