| This is not a bug. Hibernate does exactly what JDBC tells it to do, and this test proves that binding the Timezone allows you to retrieve the same Time both with Hibernate and plain JDBC. You are assuming that JDBC or Hibernate should apply the DST transformation based on the current Date, which is not true. The DST info comes from the destination TimeZone, which is UTC in our case. In your test, you saved the Time as 12:00, but the value in the DB was 10:00 as you were on the GMT+2 TimeZone. But this transformation is not relative to the day you run the test but to 1st of January 1970, when your timezone was not applying the DST. That's where the confusion comes from. If you want to save the value according to the current day DST, you need to use the LocalDateTime to build the LocalTime that you want to persist, which will create the Time object with an offset that includes the DST offset as well. Therefore, I'm closing this issue. |