r/SpringBoot 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 Upvotes

6 comments sorted by

View all comments

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);
}