Here you can find the source of parseISO(String input)
public static Date parseISO(String input) throws java.text.ParseException
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static Date parseISO(String input) throws java.text.ParseException { // NOTE: SimpleDateFormat uses GMT[-+]hh:mm for the TZ which breaks // things a bit. Before we go on we have to repair this. SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssz"); // this is zero time so we need to add that TZ indicator for if (input.endsWith("Z")) { input = input.substring(0, input.length() - 1) + "GMT-00:00"; } else {/*from ww w .j a v a 2 s .c o m*/ int inset = 6; String s0 = input.substring(0, input.length() - inset); String s1 = input.substring(input.length() - inset, input.length()); input = s0 + "GMT" + s1; } return df.parse(input); } }