(I didn't realize you could create a topic normally and did it by mail first, but that doesn't seem to be working — sorry if this topic ends up getting created twice)
Upgrading from 2.5.0 to 2.5.1 caused a test failure. Here's the simplest reproduction code:
@Testpublicvoidregression()throwsSQLException {
try(Connectionconn=dataSource.getConnection()) {
OffsetTimein=OffsetTime.now(ZoneId.of("Etc/GMT-14")).truncatedTo(ChronoUnit.SECONDS);conn.createStatement().execute("create table test(val time with time zone not null)");PreparedStatementinsert=conn.prepareStatement("insert into test(val) values(?)");insert.setObject(1, in);insert.execute();ResultSetrs=conn.createStatement().executeQuery("select val from test");rs.next();OffsetTimeout=rs.getObject(1, OffsetTime.class);assertThat(out).isEqualTo(in);
}
}
Expecting:
<02:51:05+14:00>
to be equal to:
<12:51:05+14:00>
but was not.
Something's obviously going wrong with the time component, the offset seems actually persisted correctly.
In 2.5.0 this test works fine. It's part of a suite of tests against most of the java.time classes, all with similar scenarios, and they all work in both versions without changes.
Was this an intended change (not clearly listed in release notes though) or a bug, or is "time with time zone" not the right column type?
Last edit: Marnick L'Eau 2020-10-01
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
(I didn't realize you could create a topic normally and did it by mail first, but that doesn't seem to be working — sorry if this topic ends up getting created twice)
Upgrading from 2.5.0 to 2.5.1 caused a test failure. Here's the simplest reproduction code:
Something's obviously going wrong with the time component, the offset seems actually persisted correctly.
In 2.5.0 this test works fine. It's part of a suite of tests against most of the java.time classes, all with similar scenarios, and they all work in both versions without changes.
Was this an intended change (not clearly listed in release notes though) or a bug, or is "time with time zone" not the right column type?
Last edit: Marnick L'Eau 2020-10-01
Thanks for reporting. It is a regression and will be fixed.
Fixed and committed to SVN. I would suggest you build the jar and check. Alternatively, your can check the next snapshot jar, available in a few days.
I'm just gonna wait for the patch release, but thanks!
The jar is now available.
http://hsqldb.org/download/hsqldb_snapshot_6178/