title: Unparseable date: "Fri Oct 10 23:11:07 IST 2014" (at offset 20)
body: <p>I have created this funtion to parse date but this gives exception :  Unparseable date: "Fri Oct 10 23:11:07 IST 2014" (at offset 20) . Please help as I am not able to figure out whats wrong with this code. </p>
  
  <pre><code>public Date parseDate() {
      String strDate ="Fri Oct 10 23:11:29 IST 2014";
      String newPattern = "EEE MMM dd HH:mm:ss Z yyyy";
      SimpleDateFormat formatter = new SimpleDateFormat(newPattern);
      try {
          Date date = formatter.parse(strDate);
          return date;
      } catch (java.text.ParseException e) {
          e.printStackTrace();
      }
      return null;
  }
  </code></pre>