@Test
public void test23() throws ParseException {
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date startTime = dateFormat.parse("2019-11-6 09:31:00");
Date endTime = dateFormat.parse("2019-11-6 09:32:00");
//单位是毫秒
long diff = endTime.getTime() - startTime.getTime();
long second = diff/1000;
System.out.println(second);
}