package com.java110.api.listener.floor;

import com.java110.utils.util.DateUtil;
import org.junit.Test;

import java.text.ParseException;
import java.util.Date;

/**
 * @ClassName MachineRoadGateOpenTest
 * @Description TODO
 * @Author wuxw
 * @Date 2020/1/27 12:14
 * @Version 1.0
 * add by wuxw 2020/1/27
 **/
public class MachineRoadGateOpenTest {

    @Test
    public void soService() throws ParseException {
        Date aDate = DateUtil.getDateFromString("2020-01-27 12:16:00", DateUtil.DATE_FORMATE_STRING_A);
        Date bDate = DateUtil.getDateFromString("2020-01-27 12:31:00", DateUtil.DATE_FORMATE_STRING_A);

        long diffMin = bDate.getTime() - aDate.getTime();

        System.out.println("diffMin:" + diffMin);
        System.out.println("15 min:" + 15 * 60 * 1000);
    }
}
