当前时间获取明日00:00:00时间

时间:2022-01-18 12:47:42
Date currentEndDate = new Date();
Calendar cal = Calendar.getInstance();
cal.setTime(currentEndDate);
cal.add(Calendar.DATE, 1);
cal.set(Calendar.AM_PM, 0);
cal.set(Calendar.HOUR, 0);
cal.set(Calendar.MINUTE, 0);
cal.set(Calendar.SECOND, 0);
Date nextDate = cal.getTime();
nextDate即为所求。