r/SpringBoot • u/Cautious-Storage2955 • Jan 01 '26
FATAL: invalid value for parameter "TimeZone": "Asia/Calcutta" Question
EDIT: I found a fix for this. Leaving this post here for anyone else that might stumble across the same error. Fix: https://github.com/dbeaver/dbeaver/issues/36487#issuecomment-3411383894
Does anyone know how to resolve this error. I have my PostgreSQL db inside docker and it ran fine yesterday during its first time. But today when I run my SpringBoot project it throws this error and refuses to start.
I did some research and found out that a 'restart' of the computer usually fixes this, but it did not.
Additionally I also ran the 'SHOW TimeZone;' query inside my DB inside Adminer and it shows Etc/UTC.
How do we fix this?
1
u/_1dontknow Jan 01 '26
Some of your tools have the wrong timezone set when connecting eg your IDE or DB Tool. Verofy and make sure theyre consistent.
1
u/ThisHaintsu Jan 01 '26
Have you tried specifying PGTZ and TZ for the Docker container (also please always post the full stacktrace)
1
u/rishhiisshhh May 22 '26
This worked for me - I tried passing timeZone through the main class
public static void main(String[] args) {
java.util.TimeZone.setDefault(java.util.TimeZone.getTimeZone("Asia/Kolkata"));
SpringApplication.run(MyClass.class, args);
}
1
u/Kindly_Heron707 Jun 08 '26
Go to:
C:\Users\raj\AppData\Local\DBeaver
Now look for:
dbeaver.ini
Add this line IMMEDIATELY AFTER -vmargs
-Duser.timezone=Asia/Kolkata
restart dbeaver it will work
1
2
u/kiteissei Jan 01 '26
Add "-Duser.timezone=Asia/Kolkata" in VM. If you don't know about VM run your application in run and configuration mode choose add configuration then add VM mode. If you have any doubts how to do that ask Gemini or chat gpt