I have a problem with a timestamp field which is mapped to a LocalDateTime. We don’t use UTC times in the database. Therefor, I expect the timestamp in the database to be equal to the value in the LocalDateTime.
The problem is that the conversion from a Timestamp to a LocalDateTime in LocalDateTimeJavaDescriptor uses the default timezone. For some reasons, this makes the two timestamps differ for timestamps before January 2, 1900.
I want to use no conversion (like the method Timestamp.toLocalDateTime).
One option I tried is to implement an attribute converter for Timestamp to LocalDateTime. This causes an error, because in our model LocalDateTime fields are used for versioning.
I don’t want to have to specify a custom converter to every LocalDateTime field in our domain model.
Does anyone have a solution for this problem?
Thanks in advance.