From: | "Alex Falkowski" <alex(at)l-o-u-d(dot)com> |
---|---|
To: | <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Timestamp |
Date: | 2002-06-24 01:09:44 |
Message-ID: | 002b01c21b1b$d3865ba0$0dfda8c0@wsalex |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
I read your latest java/JDBC news and i saw that you fixed the timestamp problem, yet when i install the new jar files an run this code
DataSource d = (DataSource) new InitialContext().lookup("java:comp/env/jdbc/macquarie_awards");
java.sql.Connection conn = d.getConnection();
out.println(conn.getMetaData().getDriverVersion() + "<BR>");
java.sql.PreparedStatement pstmt;
pstmt = conn.prepareStatement("SELECT o.id FROM question o WHERE (o.question_date = ?)");
pstmt.setTimestamp(1, new java.sql.Timestamp(1024668000000L));
out.println(new java.sql.Timestamp(1024668000000L) + "<BR>");
out.println(pstmt + "<BR>");
I get the following output, which clearly marks to me that setTimestamp is doing something wrong
PostgreSQL 7.2 JDBC2
2002-06-22 00:00:00.0
SELECT o.id FROM question o WHERE (o.question_date = '2002-06-21 14:00:00.00+00')
Is this being fixed, cause my EJB are not returning the right values cause of this
From | Date | Subject | |
---|---|---|---|
Next Message | Timothy Reaves | 2002-06-24 01:58:06 | Re: Posgresql - openoffice-JDBC |
Previous Message | Vernon Wu | 2002-06-23 21:32:25 | Re: servlets and JDBC (postgresql 7.2) |