Skip to content

Instantly share code, notes, and snippets.

@chetanppatil
Last active December 19, 2023 01:34
Show Gist options
  • Save chetanppatil/7ef4b82099f54ab4791068a0f47f480e to your computer and use it in GitHub Desktop.
Save chetanppatil/7ef4b82099f54ab4791068a0f47f480e to your computer and use it in GitHub Desktop.
Set dbeaver timezone to UTC (default timezone)

For Linux Users

  1. Go to directory: /usr/share/dbeaver
  2. Edit dbeaver.ini file
  3. In that file add -Duser.timezone=UTC this line under -vmargs tag
  4. Save it and restart dbeaver.
  5. Enjoy with correct date without any date conversion.

Finally your dbeaver.ini file will look like this:

-startup
plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.551.v20171108-1834
-showsplash
--launcher.GTK_version
2
-vmargs
-XX:+IgnoreUnrecognizedVMOptions
--add-modules=ALL-SYSTEM
-Xms64m
-Xmx1024m
-Duser.timezone=UTC

For Windows Users

Follow this link:

https://stackoverflow.com/questions/45323552/how-to-change-dbeaver-timezone-how-to-stop-dbeaver-from-converting-date-and-ti


Run below commands and see the difference.

SELECT now();
SELECT now() AT time ZONE 'Asia/Kolkata'
@Aunmag
Copy link

Aunmag commented Aug 19, 2019

Thanks!

@rvangsgaard
Copy link

For internet searchers using the Flatpak version of DBeaver, set time zone with this command:
flatpak run io.dbeaver.DBeaverCommunity -vmargs -Duser.timezone=UTC

Replace UTC with your preferred time zone, although I prefer to see the data as my application do (UTC).
Source: dbeaver/dbeaver#1224 (comment)

@GarryOne
Copy link

GarryOne commented Aug 4, 2020

For Mac users, the location is: /Applications/DBeaver.app/Contents/Eclipse/dbeaver.ini

@Dubroca
Copy link

Dubroca commented Sep 8, 2021

Hello, I followed the link on windows by changing the .ini file but it does not change anything, how to do please?

@chetanppatil
Copy link
Author

@Dubroca I haven't tried it on Windows, so not sure about it.

@match-gabeflores
Copy link

match-gabeflores commented Jun 17, 2022

Latest version has an option in the UI. Please upvote the answer if you find it helpful
https://stackoverflow.com/a/72533665/220997

@jsu
Copy link

jsu commented Jun 21, 2022

Latest version has an option in the UI.
https://stackoverflow.com/a/72533665/220997

Life-saving.

@akm-mdsol
Copy link

@swati-gupta01
Copy link

Thanks!

@whrocha
Copy link

whrocha commented Dec 19, 2023

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment