How to change DBeaver timezone / How to stop DBeaver from converting date and time

When I use DBeaver with Cassandra it shows an offset of +01: 00 even though the data is stored in Date or Times formats, which don't have any time zones. This leads to some weird queries:

SELECT "Time"
FROM keyspace."Table"
ORDER BY "Time" DESC;

Time
00:00:00
23:00:00
22:00:00
...
01:00:00

      

So how do I remove conversions or set the timezone to UTC?

+9


source to share


4 answers


I found another solution:

Installing the file dbeaver.ini

to the root directory of DBeaver.



Open the file:

-startup
plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.551.v20171108-1834
-showsplash
# START: change jre version, not using the one in %JAVA_HOME%
-vm 
D:\ArPortable\Java\jdk1.8.0_171\jre\bin\server\jvm.dll
# END
# JVM settings
-vmargs
-XX:+IgnoreUnrecognizedVMOptions
--add-modules=ALL-SYSTEM
-Xms64m
-Xmx1024m
# time zone
-Duser.timezone=UTC
# language
-Duser.language=en

      

+6


source


DBeaver uses the time on the installed computer, so the clock changes and DBeaver reboots. But there is a way to do it for DBeaver only.



  • Close DBeaver.
  • Navigate to the DBeaver shortcut. Probably here:

    C:\ProgramData\Microsoft\Windows\Start Menu\Programs\DBeaver

  • Right-click on it, select "Properties" and in the Target field add -vmargs -Duser.timezone=UTC

    to the end, as a result of which you get something like this:

    "C:\Program Files\DBeaver\dbeaver.exe" -vmargs -Duser.timezone=UTC

  • Start DBeaver and the time appears in UTC.

+13


source


I think this was fixed in some previous release.

Just go to Settings -> Editors -> Data Formats and check the box next to "Use custom date / time format".

enter image description here

+2


source


If it is a problem with the JDBC driver regarding the time zone:
Right click on the connection to open the connection settings.

right click on the connection to open connection settings

change timezone change the timezone for the connection

OR you can also change the server timezone driver property OR you may change the server timezone driver property

0


source







All Articles