Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 61713 invoked from network); 15 Apr 2010 09:53:12 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Apr 2010 09:53:12 -0000 Received: (qmail 24220 invoked by uid 500); 15 Apr 2010 09:53:12 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 24095 invoked by uid 500); 15 Apr 2010 09:53:11 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 24083 invoked by uid 99); 15 Apr 2010 09:53:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Apr 2010 09:53:11 +0000 X-ASF-Spam-Status: No, hits=-1292.2 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Apr 2010 09:53:09 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o3F9qnqd018659 for ; Thu, 15 Apr 2010 05:52:49 -0400 (EDT) Message-ID: <22031572.136891271325169482.JavaMail.jira@thor> Date: Thu, 15 Apr 2010 05:52:49 -0400 (EDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-4582) Timestamps inserted with GMT calendar are 1 hour later when subsequently read with GMT calendar (Server Mode Only). In-Reply-To: <1017883640.267001268666067339.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-4582?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12857249#action_12857249 ] Knut Anders Hatlen commented on DERBY-4582: ------------------------------------------- When I made some changes on the server to fix (3), I touched an area that was used to handle both CallableStatements and ResultSets. However, because of a bug (DERBY-4615) in the embedded implementation of CallableStatement.getTimestamp(int,Calendar) and friends, CallableStatements will only see half of the fix, and fixing the server code will therefore make the situation worse for CallableStatements until DERBY-4615. I think we should try to address DERBY-4615 before we attempt to fix (3), so that we don't introduce regressions for CallableStatements. > Timestamps inserted with GMT calendar are 1 hour later when subsequently read with GMT calendar (Server Mode Only). > ------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-4582 > URL: https://issues.apache.org/jira/browse/DERBY-4582 > Project: Derby > Issue Type: Bug > Components: Network Client > Affects Versions: 10.5.3.0 > Environment: Windows XP Professional Version 2002 Service Pack 3, Central Standard Time Zone (America/Chicago) > Reporter: Keith Kruse > Assignee: Knut Anders Hatlen > Attachments: calendar.diff, DerbyTest.java, junit.diff, junit.diff, upd-rs-test.diff > > > 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); > ... -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira