Here you can find the source of parseDate(String dateString)
public static Date parseDate(String dateString)
//package com.java2s; //License from project: Open Source License import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { private static DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); public static Date parseDate(String dateString) { // 2015-04-13T07:56:36.185Z format.setTimeZone(TimeZone.getTimeZone("GMT")); try {//from w ww . ja v a2s .com return format.parse(dateString); } catch (ParseException e) { return null; } } }