I am retrieving the Last-Modified value of HTTP response header and attempting to convert the String date value to Date object as:
..
URLConnection urlConnection = url.openConnection();
Map<String, List<String>> headers = urlConnection.getHeaderFields();
Date date = new SimpleDateFormat("MMMM d, yyyy", Locale.ENGLISH).parse(headers.get(LAST_MODIFIED).get(0));
This is throwing the exception:
java.text.ParseException: Unparseable date: "Thu, 27 Oct 2011 13:09:24 GMT" at java.text.DateFormat.parse(DateFormat.java:337)
Can someone spot the issue with this?! Thanks.
EDITED.