Unparseable Datum: "Fri Oct 10 23:11:07 IST 2014" (bei Versatz 20)

Ich habe diese Funktion zum Parsen des Datums erstellt, dies gibt jedoch eine Ausnahme: Nicht analysierbares Datum: "Fr 10.10., 23:11:07 IST 2014" (bei Versatz 20). Bitte helfen Sie mir, da ich nicht herausfinden kann, was mit diesem Code falsch ist.

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;
}

Antworten auf die Frage(10)

Ihre Antwort auf die Frage