求某个时间,距离该天凌晨的毫秒数
/** * 求某个时间距离这天凌晨的毫秒数 * @param date * @return * @throws ParseException */ public static long getMillonTimes(String date) throws ParseException { long time = new Date(date).getTime(); SimpleDateFormat sdfOne = new SimpleDateFormat("yyyy-MM-dd"); long overTime = (time - (sdfOne.parse(sdfOne.format(time)).getTime()))/1000; return overTime; }