Hi Steve, I'm not sure there is a better way to store the data in the database. Doing any kind of date/time math in anything else but UTC seems fraught with danger.
See below as to how we handle Java 8 types. https://github.com/pgjdbc/pgjdbc/blob/db228a4ffd8b356a9028363b35b0eb9055ea53f0/pgjdbc/src/main/java/org/postgresql/jdbc/PgPreparedStatement.java#L961-L968 Also tells you which driver I maintain. As far as my interest in this discussion goes. What is the pgjdbc driver doing that is not consistent with what hibernate is doing/wants ? I'd certainly be up for a hibernate compatibility mode. Thanks, Dave Cramer On Sun, 12 Jan 2020 at 23:36, Steve Ebersole <st...@hibernate.org> wrote: > Hi Dave. > > Same - I was swamped with stuff at the end of last week. > > Yes, from what I was reading postgres is a bit strange in storing temporal > values. Not unique to postgres - many databases do interesting things. > > I'm curious how the driver handles binding Java 8 types directly. The > JDBC spec was updated to support these types through the generic > `#setObject` methods (`#getObject` as well?). Does the driver handle this. > > Out of curiosity, which jdbc driver are you helping with? > > > > On Thu, Jan 9, 2020 at 10:23 AM Dave Cramer <davecra...@gmail.com> wrote: > >> Hi, >> >> As one of the maintainers of the postgres jdbc driver I am interested in >> this discussion. >> Postgres only stores date/times in UTC. Everything else is a translation. >> The driver uses the client's timezone for all dates/times (for better or >> worse) If there is anything I can do to help make things easier, let me >> know. >> >> >> >> -- >> Sent from: http://hibernate-development.74578.x6.nabble.com/ >> _______________________________________________ >> hibernate-dev mailing list >> hibernate-dev@lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/hibernate-dev >> >> _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev