Derby
  1. Derby
  2. DERBY-4582

Timestamps inserted with GMT calendar are 1 hour later when subsequently read with GMT calendar (Server Mode Only).

    Details

    • Urgency:
      Normal
    • Bug behavior facts:
      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);
      ...

      1. DerbyTest.java
        9 kB
        Keith Kruse
      2. calendar.diff
        17 kB
        Knut Anders Hatlen
      3. junit.diff
        10 kB
        Knut Anders Hatlen
      4. ASF.LICENSE.NOT.GRANTED--junit.diff
        13 kB
        Knut Anders Hatlen
      5. ASF.LICENSE.NOT.GRANTED--upd-rs-test.diff
        5 kB
        Knut Anders Hatlen
      6. derby-4582-1a-client-send.diff
        24 kB
        Knut Anders Hatlen
      7. derby-4582-2a-server-receive.diff
        9 kB
        Knut Anders Hatlen
      8. derby-4582-3a-server-send.diff
        9 kB
        Knut Anders Hatlen
      9. derby-4582-4a-client-receive.diff
        44 kB
        Knut Anders Hatlen
      10. derby-4582-5a-bugfix.diff
        3 kB
        Knut Anders Hatlen
      11. derby-4582-6a-javame.diff
        3 kB
        Knut Anders Hatlen
      12. derby-4582-10.5.diff
        71 kB
        Lily Wei

        Issue Links

          Activity

          Gavin made changes -
          Workflow jira [ 12501859 ] Default workflow, editable Closed status [ 12802827 ]
          Knut Anders Hatlen made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Kathey Marsden made changes -
          Labels dst gmt settimestamp timestamp derby_backport_reject_10_5 dst gmt settimestamp timestamp
          Kathey Marsden made changes -
          Link This issue is required by DERBY-4994 [ DERBY-4994 ]
          Kathey Marsden made changes -
          Link This issue is required by DERBY-4994 [ DERBY-4994 ]
          Rick Hillegas made changes -
          Fix Version/s 10.7.1.1 [ 12315564 ]
          Fix Version/s 10.7.1.0 [ 12314971 ]
          Knut Anders Hatlen made changes -
          Fix Version/s 10.6.2.1 [ 12315343 ]
          Fix Version/s 10.6.2.0 [ 12315342 ]
          Kathey Marsden made changes -
          Fix Version/s 10.6.2.0 [ 12315342 ]
          Fix Version/s 10.6.1.1 [ 12314973 ]
          Lily Wei made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Lily Wei made changes -
          Assignee Lily Wei [ lilywei ] Knut Anders Hatlen [ knutanders ]
          Lily Wei made changes -
          Attachment derby-4582-10.5.diff [ 12449629 ]
          Mamta A. Satoor made changes -
          Assignee Mamta A. Satoor [ mamtas ] Lily Wei [ lilywei ]
          Mamta A. Satoor made changes -
          Assignee Lily Wei [ lilywei ] Mamta A. Satoor [ mamtas ]
          Lily Wei made changes -
          Assignee Knut Anders Hatlen [ knutanders ] Lily Wei [ lilywei ]
          Kathey Marsden made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Kathey Marsden made changes -
          Link This issue is required by DERBY-4728 [ DERBY-4728 ]
          Knut Anders Hatlen made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Fix Version/s 10.6.1.1 [ 12314973 ]
          Resolution Fixed [ 1 ]
          Knut Anders Hatlen made changes -
          Attachment derby-4582-6a-javame.diff [ 12443185 ]
          Knut Anders Hatlen made changes -
          Attachment derby-4582-5a-bugfix.diff [ 12442984 ]
          Knut Anders Hatlen made changes -
          Link This issue incorporates DERBY-4633 [ DERBY-4633 ]
          Knut Anders Hatlen made changes -
          Fix Version/s 10.7.0.0 [ 12314971 ]
          Issue & fix info [Patch Available]
          Knut Anders Hatlen made changes -
          Issue & fix info [Patch Available]
          Knut Anders Hatlen made changes -
          Attachment derby-4582-4a-client-receive.diff [ 12442852 ]
          Knut Anders Hatlen made changes -
          Attachment derby-4582-3a-server-send.diff [ 12442529 ]
          Knut Anders Hatlen made changes -
          Issue & fix info [Patch Available]
          Knut Anders Hatlen made changes -
          Issue & fix info [Patch Available]
          Knut Anders Hatlen made changes -
          Attachment derby-4582-2a-server-receive.diff [ 12442320 ]
          Knut Anders Hatlen made changes -
          Link This issue is blocked by DERBY-4621 [ DERBY-4621 ]
          Knut Anders Hatlen made changes -
          Issue & fix info [Patch Available]
          Knut Anders Hatlen made changes -
          Issue & fix info [Patch Available]
          Knut Anders Hatlen made changes -
          Attachment derby-4582-1a-client-send.diff [ 12442157 ]
          Knut Anders Hatlen made changes -
          Link This issue is blocked by DERBY-4615 [ DERBY-4615 ]
          Knut Anders Hatlen made changes -
          Attachment upd-rs-test.diff [ 12441610 ]
          Knut Anders Hatlen made changes -
          Attachment junit.diff [ 12441408 ]
          Knut Anders Hatlen made changes -
          Attachment junit.diff [ 12441143 ]
          Knut Anders Hatlen made changes -
          Attachment calendar.diff [ 12441130 ]
          Knut Anders Hatlen made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Knut Anders Hatlen made changes -
          Assignee Knut Anders Hatlen [ knutanders ]
          Knut Anders Hatlen made changes -
          Bug behavior facts [Wrong query result] [Embedded/Client difference, Wrong query result]
          Issue & fix info [Newcomer]
          Component/s Network Client [ 11690 ]
          Keith Kruse made changes -
          Field Original Value New Value
          Attachment DerbyTest.java [ 12438832 ]
          Keith Kruse created issue -

            People

            • Assignee:
              Knut Anders Hatlen
              Reporter:
              Keith Kruse
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development