dbeaver: Can not setup client timezone
In the conection properties did not find how to setup client’s timezone
Even starting transaction in a tab did not help:
begin;
SET TIME ZONE 'UTC';
select ..... ;
so I get wrong (not desired) results: http://joxi.ru/vAWMwOZI1L0Ejm (sorry, text is not copied)
but in the psql I get for same query:
startdate | enddate | amount | amount | valid
------------------------+------------------------+--------+--------+-------------------------
2018-08-01 00:00:00+00 | 2018-08-02 00:00:00+00 | 14 | 14 | [2018-08-01,2018-08-02)
2018-08-02 00:00:00+00 | 2018-08-03 00:00:00+00 | 14 | 14 | [2018-08-02,2018-08-03)
2018-08-03 00:00:00+00 | 2018-08-04 00:00:00+00 | 14 | 14 | [2018-08-03,2018-08-04)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 20 (8 by maintainers)
@serge-rider I’m not suggesting that DBeaver is changing the value stored in PostgreSQL.
I’m saying that the combination of the following two facts results in very misleading behavior with DBeaver defaults
timestampvaluesuser.timezoneSystem property which affects the timezone that DBeaver translates Postgres’s UTCtimestampvalues intoTo recreate the scenario I’m describing simply launch DBeaver with a
user.timezoneof something other than UTC (anything with a non-zero UTC offset will do). Potentially your system default is already suitable.Here’s the problematic SQL
I’m in
ESTand I see2018-08-08 08:00:00.The value you’ll see (presuming your
user.timezonesystem property is not one with a 00:00 UTC offset) will NOT match the literal you entered. Even IF you specify a+00:00offset in yourtimestampliteral then the selected value from the last line will not display as you expect because DBeaver is converting it to youruser.timezone.At the end of the day it simply seems misleading to convert a zero offset value to a non zero offset value and not display the offset you’ve applied.
@KES777 the issue is that DBeaver is formatting the time to your user timezone and then HORRIBLY not including the offset or timezone abbreviation in the output. You should see a timezone abbreviation in the bottom of your status bar that indicates this. This results in very confusion output from UTC datetimes from PostgreSQL as you’re running in to.
I’ve not been able to affect the
user.timezonesystem property with DBeaver command line arguments in Linux.will all result in DBeaver still reporting the timezone as “EST” upon startup and formatting
Timestampsaccordingly.The only way I’ve found that can actually change DBeaver’s timezone is by editing the system dbeaver.ini file to add
-Duser.timezone=UTCIt would be a much less confusing default if DBeaver would at least put the timezone name or offset that it is applying to datetime/timestamp values when formatting them.