Bug with OffsetDateTime deserialization?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Bug with OffsetDateTime deserialization?

Michele Mancioppi
Hi,

I might be missing something obvious about timezones, but I think there may be a bug in the way the HSQL 2.4.0 JDBC driver deserializes TIMESTAMP WITH TIME ZONE data as OffsetTimeZone objects: on the one hand, ResultSet.getString(n) returns "2009-10-02 16:52:30.000000+2:00" (which is exactly what I expected); on the other hand, ResultSet.getObject(n) returns an OffsetTimeZone that, to string, maps to "2009-10-02T14:52:30+02:00". That it, it seems to me the timezone is applied twice. I did not look in the code, but this is exactly the faulty outcome I would expect if the OffsetTimeZone object had been created using the value of ResultSet.getTime(n) and then had the +2:00 timezone applied to it.

I am using the following Maven dependency:

            <dependency>
                <groupId>org.hsqldb</groupId>
                <artifactId>hsqldb</artifactId>
                <version>2.4.0</version>
            </dependency>

Is it a bug on the code, or is the bug between keyboard and chair? :-)

Best,
  Michele

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Hsqldb-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/hsqldb-user
Loading...