如果使用Apache commons-
lang,则可以使用DateUtils舍入日期:
Date now = new Date();Date nearestMinute = DateUtils.round(now, Calendar.MINUTE);

如果使用Apache commons-
lang,则可以使用DateUtils舍入日期:
Date now = new Date();Date nearestMinute = DateUtils.round(now, Calendar.MINUTE);