求某个时间,距离该天凌晨的毫秒数

  /**
     * 求某个时间距离这天凌晨的毫秒数
     * @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;
    }
原文地址:https://www.cnblogs.com/prader6/p/12122583.html