Search code examples
postgresqltimezonesynologydb-schema

PostgreSQL timezone error with DbSchema


I want to setup my postgreSQL server to 'Europe/Berlin' but having an error:

SET time zone 'Europe/Berlin';
ERROR:  invalid value for parameter "TimeZone": "Europe/Berlin"

But the real issue is with DdbSchema, when I want to connect to my DB i've got the error

FATAL: invalid value for parameter "TimeZone": "Europe/Berlin"

DbSchema works when I connect to my local db but not with my NAS (Synology) DB.

Any idea ?


Solution

  • Found a way to solve the problem:

    You have to start java with the proper time zone.

    In my case, my server is GMT, so i had to add the args -Duser.timezone=GMT

    • For DbSchema, edit the file DbSchema.bat or DbSchema.sh
    • Find the declaration of SWING_JVM_ARGS
    • Add the argument -Duser.timezone=GMT a the end of the line
    • Start DbSchema with this script DbSchema.bat or DbSchema.sh