relationship between database/session/vm/local timezones has been clarified
There is some clarification needed!
Database uses datetimes with timezones.
This means:
- database should be set up in 'UTC'
- insertions should be done in 'UTC'
There are different return values, when the database is set up in 'Etc/UTC' or in 'Europe/Berlin'.
Actual timezone settings can be seen using the command:
SELECT * FROM pg_timezone_names WHERE name = current_setting('TIMEZONE');
Timezone can be set via:
SET TIMEZONE='UTC';
The config_file of the database can be found with the following command:
SHOW config_file
Edit the configuration file, and set timezone to 'UTC'.
Roload the new configuration with the command:
pg_ctlcluster 13 main reload
A listing of all running clusters is given with the command:
pg_lsclusters