Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-247

Failing to correctly identify CST(TimeZone)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Not a Bug
    • 1.3.3, 1.3.4
    • 1.5.1-RC
    • Other
    • None
    • java version "1.7.0_75"
      10.0.21-MariaDB

    Description

      Environment:
      The System TimeZone is UTC +8:00 - CST(China Standard Time)
      mariadb:
      SHOW VARIABLES LIKE '%time_zone%';
      system_time_zone CST
      time_zone SYSTEM

      It happens when i create a preparedStatement and set a timestamp value

       
      private Timestamp occurTime;
       
       public Timestamp getOccurTime() {
              return occurTime;
          }
       
          public void setOccurTime(Timestamp occurTime) {
              this.occurTime = occurTime;
          }
       
       public void convertToStatement(PreparedStatement preparedStatement) throws SQLException {
        preparedStatement.setTimestamp(1, occurTime);
      }

      The correct value is '2016-1-12 10:00:45 257452' AND The value in _stmt(preparedStatement ) is '2016-1-11 20:00:45 257452'

      The gap is 14 hours ,So is it convert incorrectly to Central Standard Time (UTC -6:00)?

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            Meedly Tong Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.