DateTime { public static String create(Date date) { Assert.notNull(date, "date"); synchronized (DT_FORMAT) { return DT_FORMAT.format(date); } } private  DateTime(); static String create(Date date); static Date parseDate(String s);  }
@Test public void testCreate() { GregorianCalendar calendar = new GregorianCalendar(TimeZone.getTimeZone("GMT")); calendar.set(2010, 5, 4, 23, 12, 34); String isoDateTime = DateTime.create(calendar.getTime()); assertEquals("2010-06-04T23:12:34Z", isoDateTime); }