Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiOGMyNTdhZDhj...
) / Improvement (
https://hibernate.atlassian.net/browse/HHH-16317?atlOrigin=eyJpIjoiOGMyNT...
) HHH-16317 (
https://hibernate.atlassian.net/browse/HHH-16317?atlOrigin=eyJpIjoiOGMyNT...
) Add StandardBasicTypes.INSTANT_WITHOUT_TIMEZONE (
https://hibernate.atlassian.net/browse/HHH-16317?atlOrigin=eyJpIjoiOGMyNT...
)
Issue Type: Improvement Assignee: Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) Components: hibernate-core Created: 15/Mar/2023 10:45 AM Priority: Major Reporter:
Christian Beikov (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
This is useful when one wants to bind a timestamp parameter to an Instant , which might
fail on PostgreSQL, because right now, we use InstantAsTimestampWithTimeZoneJdbcType for
that dialect, which binds OffsetDateTime through the JDBC driver.
It has yet to be confirmed if this is a bug or not, but pgjdbc shifts OffsetDateTime to
the JVM TZ when binding to a timestamp column. If this is correct JDBC behavior, we might
as well drop the InstantAsTimestampWithTimeZoneJdbcType and use InstantAsTimestampJdbcType
instead for PostgreSQL.
NB: InstantAsTimestampJdbcType uses a shared calendar for passing UTC as time zone. Maybe
we need to copy that to be safe, but we could switch between a copying and shared
implementation based on what we know about the drivers.
(
https://hibernate.atlassian.net/browse/HHH-16317#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16317#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100217- sha1:fd7c927 )