### Question:
DateUtil { public static String getDateStringLogStandardFormat(Date date) { SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy:HH:mm:ss Z"); return dateFormat.format(date); }  static String getDateStringLogStandardFormat(Date date);  }### Answer:
@Test public void getDateStringLogStandardFormatTest() throws Exception { String oldstring = "2011-01-18 00:00:00.0"; Date date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S").parse(oldstring); String output = DateUtil.getDateStringLogStandardFormat(date); assertEquals("18/01/2011:00:00:00 +0100", output); }