#1838 - Fix for Joda LocalTime timezone handling for MySql

This commit is contained in:
rob bygrave
2019-10-10 15:16:12 +13:00
parent 573673ef2b
commit d6bab46ac3
2 changed files with 12 additions and 2 deletions
@@ -159,7 +159,12 @@ public class DataBind {
}
public void setTime(Time v) throws SQLException {
pstmt.setTime(++pos, v);
Calendar timeZone = dataTimeZone.getTimeZone();
if (timeZone != null) {
pstmt.setTime(++pos, v, timeZone);
} else {
pstmt.setTime(++pos, v);
}
}
public void setBoolean(boolean v) throws SQLException {
@@ -175,7 +175,12 @@ public class RsetDataReader implements DataReader {
@Override
public Time getTime() throws SQLException {
return rset.getTime(pos());
Calendar cal = dataTimeZone.getTimeZone();
if (cal != null) {
return rset.getTime(pos(), cal);
} else {
return rset.getTime(pos());
}
}
@Override