Parse svn log -xml date output using SimpleDateFormat
问题 The date format of the xml output of the svn log command is like the following. 2014-04-24T08:51:58.213757Z I tried to parse this to a util.Date object using SimpleDateFormat with the following String. yyyy-MM-ddTHH:mm:ss.SSSSSSZ Complete method protected Date formatDate(String dateString) { //2014-04-24T08:51:58.213757Z DateFormat format = new SimpleDateFormat("yyyy-MM-ddTHH:mm:ss.SSS"); format.setTimeZone(TimeZone.getTimeZone("Asia/Colombo")); Date date = null; int lengthToParse = "yyyy-MM