I have a project where one of my entities has an attribute of type java.time.LocalTime. During my tests I notice that the time saved to my test database (H2) was incorrect. My date was fixed in my test, like this:
LocalTime.of(8, 10, 55);
However, every time a time was saved in the database, it was completely off.
I debugged the hibernate code and manage to find out that the problem is actually in the Jadira framework, more specifically in the class TimeColumnLocalTimeMapper:
There was even an issue logged there from someone with a similar problem.
The reason that I’m posting this here is to know if there’s any way to replace Jadira by another mapper or another way to use LocalTime as my column type, without relying on the Jadira framework.
It probably won’t be fixed soon. (I will try to create a pull request there).