Time validation error without any apparent reasons

Hi everyone,

We are currently facing an error with the time validation in Cuba without knowing how to detect the cause, and hopefully looking for a solution here.

Here are the details:
Our Cuba Studio is at the latest version: 7.2.8.
Using Tomcat 9.0.39 & MySQL database
Deploying on an ubuntu 20.04
(We also tried deploying with Docker & jenkin but we had the same problem)
Cuba’s timezone is already set with our local zone of GMT+7.

We have two entities of Company & Organization. And in both of them we are setting an Onboard Date of type LocalDateTime with @PastOrPresent annotation.

This field validation works fine in localhost.
But when we compiled the app to a WAR file and deployed it to a local Tomcat server, the date validation for the above-mentioned field started throwing the error message we set up for the @PastOrPresent annotation.

error

As you can see in the screenshot, we are setting 1 hour ahead yet the error is still popping up. The time mismatch is also different among the entity. For the Company entity it is up to 20-ish hours, but this Organization entity is about 1 hour only.

More curiously this problem started 1 day after deployment…

We’d really appreciate any help on this!

Thank you in advance and best regards,

Tuan Ngo

Hi,

What is your time zone setting on the Ubuntu box? The annotation is based on the servers time zone config I guess.

Cheers
Mario

1 Like

Hi Mario,

The Ubuntu is on the same time zone as ours (GMT+7).
Tomcat has the same time zone as well.

Thanks a lot for your attention (:

Hi everyone,
We’ve just encountered the same error, including the problem started one day after deployment.
Which solution has been found to solve this problem?.
Any ideas would be welcome.

Thanks

Xavier Lorente