Menu ▾ ▴

#1701 java.time types return different values

current-release
open-fixed
5
2024-04-29
2024-04-21
kustos
No

When using java.time types and getObject / setObject sometimes different values are returned. See the attached reproducer for an example. The reproducer has to be run in a time zone that observes DST, ie. not UTC.

I could identify two different issues:

  1. TIMESTAMP / LocalDateTime seems to go through java.sql.Timestamp. This will lead to issues for timestamps that fall into DST transitions.
  2. TIME / LocalTime values are an hour off. I have no idea what is happening here. Maybe a base index 0 vs. base index 1 issue.

This is related to https://sourceforge.net/p/hsqldb/feature-requests/331/

1 Attachments

Discussion

  • Fred Toussi

    Fred Toussi - 2024-04-24
    • assigned_to: Fred Toussi
     
  • Fred Toussi

    Fred Toussi - 2024-04-24

    Thanks for reporting. I will commit the fix in a few days and make a snaphot jar available for testing.

     
  • kustos

    kustos - 2024-04-28

    Awesome. Thanks for picking this up so quickly.

     
  • Fred Toussi

    Fred Toussi - 2024-04-29
    • status: open --> open-fixed
     
  • Fred Toussi

    Fred Toussi - 2024-04-29

    Fix committed to SVN.

     

Log in to post a comment.