Date date = new Date(); //转换成localdate LocalDate temp = date .toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); //localdate 转化成sql date, newNextDueDate = java.sql.Date.valueOf(temp);