FATAL: invalid value for parameter “TimeZone”: “America/Los_Angeles” with DBeaver

I got that message when trying to use DBeaver to connect to a PostgreSQL DB.

FATAL: invalid value for parameter "TimeZone": "America/Los_Angeles"

I found the fix here. The first thing to check is the timezone you have set on the Postgres db itself. You can do this by running “SELECT * FROM pg_timezone_names;”.

Here’s an example:

avenger_agent_prod=# SELECT * FROM pg_timezone_names;
name | abbrev | utc_offset | is_dst
------+--------+------------+--------
UTC | UTC | 00:00:00 | f
(1 row)

The fix is to make a small change the dbeaver.ini file in DBeaver root directory. If you installed this on a Mac, the file is in /Applications/DBeaver.app/Contents/Eclipse/

Just add:

-Duser.timezone=UTC
-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

When you restart DBeaver, it should connect.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.