@Test public void testIsoDateTime() throws ParseException { ZonedDateTime expectedDate = ZonedDateTime.now(ZoneOffset.UTC); String sExpectedDate = DateTimeUtils.isoDateTime(expectedDate); String sdate = DateTimeUtils.isoDateTime( expectedDate.getYear(), expectedDate.getMonthValue(), expectedDate.getDayOfMonth(), expectedDate.getHour(), expectedDate.getMinute(), expectedDate.getSecond(), expectedDate.getNano()/1000000).format(DateTimeFormatter.ISO_INSTANT); assertEquals(sExpectedDate.substring(0, 18), sdate.substring(0, 18)); ZonedDateTime date2 = DateTimeUtils.isoDateTime("2015-11-30T16:06:15.679Z"); assertNotNull(date2); }
public static String isoDateTime(ZonedDateTime zonedDateTime) { return zonedDateTime.format(DateTimeFormatter.ISO_INSTANT); }
DateTimeUtils { public static String isoDateTime(ZonedDateTime zonedDateTime) { return zonedDateTime.format(DateTimeFormatter.ISO_INSTANT); } }
DateTimeUtils { public static String isoDateTime(ZonedDateTime zonedDateTime) { return zonedDateTime.format(DateTimeFormatter.ISO_INSTANT); } private  DateTimeUtils(); }
DateTimeUtils { public static String isoDateTime(ZonedDateTime zonedDateTime) { return zonedDateTime.format(DateTimeFormatter.ISO_INSTANT); } private  DateTimeUtils(); static String now(); static ZonedDateTime nowZDT(); static String isoDateTime(ZonedDateTime zonedDateTime); static ZonedDateTime isoDateTime(int year, int month, int dayOfMonth, int hourOfDay, int minute, int second, int millisec); static ZonedDateTime isoDateTime(String s); static ZonedDateTime isoDateTime(Date date); static ZonedDateTime isoDateTime(long epockMillis); static boolean isBetweenTimesInclusive(ZonedDateTime dateTime, ZonedDateTime startDateTime, ZonedDateTime endDateTime); static long difference(ZonedDateTime t1, ZonedDateTime t2); static Long elapsedTime(ZonedDateTime zonedDateTime); }
DateTimeUtils { public static String isoDateTime(ZonedDateTime zonedDateTime) { return zonedDateTime.format(DateTimeFormatter.ISO_INSTANT); } private  DateTimeUtils(); static String now(); static ZonedDateTime nowZDT(); static String isoDateTime(ZonedDateTime zonedDateTime); static ZonedDateTime isoDateTime(int year, int month, int dayOfMonth, int hourOfDay, int minute, int second, int millisec); static ZonedDateTime isoDateTime(String s); static ZonedDateTime isoDateTime(Date date); static ZonedDateTime isoDateTime(long epockMillis); static boolean isBetweenTimesInclusive(ZonedDateTime dateTime, ZonedDateTime startDateTime, ZonedDateTime endDateTime); static long difference(ZonedDateTime t1, ZonedDateTime t2); static Long elapsedTime(ZonedDateTime zonedDateTime);  }