public static String formatDate(final Date date) {
    return LocalDate.ofEpochDay(TimeUnit.MILLISECONDS.toDays(date.getTime())).toString();
  }
@Test
  public void shouldFormatDate() {
    assertThat(SqlTimeTypes.formatDate(new Date(864000000)), is("1970-01-11"));
    assertThat(SqlTimeTypes.formatDate(new Date(864000000 - 10)), is("1970-01-10"));
  }