You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the supported date types are only java.util.Date, java.time.LocalDate, java.time.LocalDateTime and java.time.LocalTime. This could be improved by adding built-in converters for the java.time.OffsetDateTime and java.time.ZonedDateTime, as they both provide actual moments in time as opposed to their Local alternatives. They are also generic and widely used java.time types
I don't want to add logic for Zoned* variants of date and time types.
In almost all cases we have seen, the timezone should not be tied to the date type, but some other object (the location where an event is happening, the location where a user is located ..) and therefore stored separately.
The combination of a date/time with a timezone is then really part of the presentation layer.
If you want to represent a point in time Instant is most often the right time to use at least on the persistence side of things which is also supported by Spring Data JDBC.
If your database/JDBC driver directly supports Zoned* types you should be able to register it as a simple type.
Doing so for databases that support it would be a valid issue/PR.
Milan Milanov opened DATAJDBC-414 and commented
Currently the supported date types are only
java.util.Date
,java.time.LocalDate
,java.time.LocalDateTime
andjava.time.LocalTime
. This could be improved by adding built-in converters for thejava.time.OffsetDateTime
andjava.time.ZonedDateTime
, as they both provide actual moments in time as opposed to theirLocal
alternatives. They are also generic and widely usedjava.time
typesIssue Links:
The text was updated successfully, but these errors were encountered: