Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
10.5.3.0
-
Windows XP Professional Version 2002 Service Pack 3, Central Standard Time Zone (America/Chicago)
-
Normal
-
Embedded/Client difference, Wrong query result
Description
This issue only appears to happen in Network Server/Client mode. Embedded mode does not have the issue.
My timezone is American/Chicago. Saving timestamps with values for the 6 hours prior to DST start are being read back in as values 1 hour later than written. (I believe the issue happens on the write because values written in Network Server/Client mode and read in Embedded mode are incorrect, while values written and read in Embedded mode are corect.)
Values between 3/13/2010 - 20:00 CST and 3/14/2010 - 02:00 CST will return timstamps 1 hour off. The "setTimestamp" method is being passed a GMT calendar with the timestamp:
I have a complete test class I can attach, but here is a summary:
private final TimeZone gmtTZ = TimeZone.getTimeZone("GMT");
private final Calendar gmtCal = Calendar.getInstance(gmtTZ);
...
String sql = "INSERT INTO app.dst_test (id, gmt_timestamp, milli_time) VALUES(?,?,?)";
String sql2 = "SELECT * from app.dst_test where id=?";
...
ps.setTimestamp(2, ts, gmtCal);
...
Timestamp tsRead = rs.getTimestamp("gmt_timestamp", gmtCal);
...
Attachments
Attachments
Issue Links
- incorporates
-
DERBY-4633 Cache default calendar in result sets and statements on client driver
- Closed
- is blocked by
-
DERBY-4615 EmbedCallableStatement ignores Calendar in getDate, getTime and getTimestamp
- Closed
-
DERBY-4621 Invalid conversion from Timestamp to String when calling setTimestamp() with Calendar
- Closed
- is required by
-
DERBY-4728 10.5 backport effort tracking issue
- Closed