mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix DateTime bug
This commit is contained in:
parent
a9d8cae6b1
commit
f540888a4c
@ -268,7 +268,13 @@ public class HandleHelper {
|
|||||||
Object rawValue;
|
Object rawValue;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case Types.TIMESTAMP:
|
case Types.TIMESTAMP:
|
||||||
rawValue = rs.getTimestamp(columnIndex);
|
try{
|
||||||
|
rawValue = rs.getTimestamp(columnIndex);
|
||||||
|
} catch (SQLException ignore){
|
||||||
|
// issue#776@Github
|
||||||
|
// 当数据库中日期为0000-00-00 00:00:00报错,按照普通日期获取
|
||||||
|
rawValue = rs.getDate(columnIndex);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case Types.TIME:
|
case Types.TIME:
|
||||||
rawValue = rs.getTime(columnIndex);
|
rawValue = rs.getTime(columnIndex);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user