@Test
public void millisStrToDate() throws Exception {

    long d0 = 0l;
    long d1 = 1501127802975l; // 2017-07-27 11:56:42:975 +8
    long d2 = 1501127835658l; // 2017-07-27 11:57:15:658 +8
    TimeZone timeZone = TimeZone.getDefault();
    Date date0 = new Date(d0 - timeZone.getOffset(d0));
    Date date1 = new Date(d1 - timeZone.getOffset(d1));
    Date date2 = new Date(d2 - timeZone.getOffset(d2));
    String s0 = "1970-01-01 00:00:00.000";
    String s1 = "2017-07-27 03:56:42.975";
    String s2 = "2017-07-27 03:57:15.658";
    Assert.assertEquals(DateUtils.millisStrToDate(s0).getTime(), date0.getTime());
    Assert.assertEquals(DateUtils.millisStrToDate(s1).getTime(), date1.getTime());
    Assert.assertEquals(DateUtils.millisStrToDate(s2).getTime(), date2.getTime());
}