diff --git a/src/main/java/cn/com/tenlion/util/IdCardVerifyUtil.java b/src/main/java/cn/com/tenlion/util/IdCardVerifyUtil.java index eee573c..979382e 100644 --- a/src/main/java/cn/com/tenlion/util/IdCardVerifyUtil.java +++ b/src/main/java/cn/com/tenlion/util/IdCardVerifyUtil.java @@ -6,6 +6,7 @@ import net.sf.jsqlparser.expression.DateTimeLiteralExpression; import org.apache.commons.lang3.StringUtils; import org.joda.time.DateTime; import org.joda.time.Days; +import org.joda.time.LocalDateTime; import org.joda.time.Years; import org.joda.time.format.DateTimeFormat; @@ -601,8 +602,8 @@ public class IdCardVerifyUtil { public static Integer getIdCardAge(String cardNo) { String birthday = getIdCardBirthday(cardNo); - DateTime nowDateTime = DateTime.now(); - DateTime birthdayDateTime = DateTime.parse(birthday, DateTimeFormat.forPattern(ISystemConstant.DATE_FORMATTER_YYYY_MM_DD)); + LocalDateTime nowDateTime = LocalDateTime.now(); + LocalDateTime birthdayDateTime = LocalDateTime.parse(birthday, DateTimeFormat.forPattern(ISystemConstant.DATE_FORMATTER_YYYY_MM_DD)); return Years.yearsBetween(birthdayDateTime, nowDateTime).getYears(); }