mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#1838 - Fix for Joda LocalTime timezone handling for MySql
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user