Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Not a Bug
-
1.3.3, 1.3.4
-
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)?