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.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.TimeZone; public class Main { private static final TimeZone GMT = TimeZone.getTimeZone("GMT"); private static final String DATE_PATTERN = "EEE, dd MMM yyyy HH:mm:ss zzz"; public static Date parseDate(String dateString) { if (dateString == null) { return null; }//from w ww. j a v a 2s.co m SimpleDateFormat format = new SimpleDateFormat(DATE_PATTERN, Locale.US); format.setTimeZone(GMT); try { return format.parse(dateString); } catch (ParseException ignore) { } return null; } }