I don't know what is wrong, but this is a test-case that shows the problem, to 
be used in the TestDateStorage class

    private void testXXX() throws SQLException {
        Connection conn = getConnection("date");
        TimeZone defaultTimeZone = TimeZone.getDefault();
        Statement stat = conn.createStatement();
        stat.execute("create table test(ts timestamp primary key)");
        try {
            TimeZone.setDefault(TimeZone.getTimeZone("PST"));
            DateTimeUtils.resetCalendar();
            java.sql.Timestamp date1 = java.sql.Timestamp.valueOf("2010-03-13 
18:15:00");
            java.sql.Timestamp date2 = java.sql.Timestamp.valueOf("2010-03-13 
19:15:00");
            Calendar utcCalendar = new GregorianCalendar(new SimpleTimeZone(0, 
"Z"));
            PreparedStatement prep = conn.prepareStatement("INSERT INTO TEST 
VALUES(?)");
            prep.setTimestamp(1, new java.sql.Timestamp(date1.getTime()), 
utcCalendar);
            prep.execute();
            prep.setTimestamp(1, new java.sql.Timestamp(date2.getTime()), 
utcCalendar);
            prep.execute();
        } finally {
            TimeZone.setDefault(defaultTimeZone);
            DateTimeUtils.resetCalendar();
        }
        conn.close();
        deleteDb("date");
    }


Jamie Clark wrote:
> 2010-03-13 18:15

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to