Is there a way to pass the timezone into Postgres. ?
I would like for the dates to be GMT+1
The PostgreSQL docs describe two environment variables related to this.
initdbuses TZ as the value it writes to postgres.conf
libpq checks for PGTZ to determine which time zone to set (for the client) after connecting (to the server)
I suspect setting these in the usual fashion will work but haven't tried it.
I can confirm that passing -e TZ=Europe/Amsterdam sets the default timezone to Europe/Amsterdam.
Keep in mind that the value should be a full time zone name. See: https://www.postgresql.org/docs/9.5/static/datatype-datetime.html#DATATYPE-TIMEZONES
Closing old issue. Looks like this was resolved.
Most helpful comment
I can confirm that passing
-e TZ=Europe/Amsterdamsets the default timezone to Europe/Amsterdam.Keep in mind that the value should be a full time zone name. See: https://www.postgresql.org/docs/9.5/static/datatype-datetime.html#DATATYPE-TIMEZONES