-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dbeaver using local timezone for postgres remote connections #6015
Comments
This is a known issue in PG JDBC driver. However jdcb driver team added Java8 dattime support recently and we going to use it next versions of DBeaver https://jdbc.postgresql.org/documentation/head/java8-date-time.html |
great news indeed! awaiting eagerly for the next release. :) |
Unfortunatelly I had a wrong impression. Although Java8 date api is supported by driver but all timezone based data types are actually fake types. I don't know how to handle time zones in postgresql better. |
If anybody has any ideas how to do this better - please advise. And I'll reopen this ticket. |
I also got bitten by this issue. To get an unambiguously correct UTC timestamp from a query, you can use the following: For a field of type
For a field of type
These queries always give the same answer in DBeaver as in psql. (This assumes your database server is set to UTC, but it doesn't matter what your local computer clock is) |
Please reopen. I run into the issue. The SQL database is UTC but all queries and information are displayed in my local timezone. This leads to very dangerous issues pgpartman/pg_partman#334 |
I could fix it with #13416 (comment) |
This is not a bug, it is normal for postgresql clients to use their local timezone. On a standard psql client you type The only thing perhaps dBeaver might do, would be to make the current settings more obvious, to avoid confusion. If you never want timezone adjustments, better use the https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-TIMEZONES |
Hello,
I have noticed that my Dbeaver is always using my local time on all connections to remote servers.
Im located in Spain (UTC+2) and I work on servers locate in Ghana (UTC). I have checked the postgres conifg on the remote server and it has its timezone config properly set up for Ghana (Africa/Accra).
When querying a remote server I always get the time/dates translated to my local UTC+2. and when updating a timestamp on the remote server, it will always get translated to the remote server time. This causes a lot of issues as you can imagine.
I have checked the "use native settings" option in the connection settings as explained here: #4181 (comment) but there is no difference at all: both times and timezones are still local.
This happens with all my remote servers on differents parts of the world.
This is my system info:
If there is anything else I could/should provide, please let me know.
Thanks in advance for any help you can provide :)
The text was updated successfully, but these errors were encountered: