无法解析的日期异常 java

Unparsable Date exception java

我正在获取这种格式的日期"Sat May 02 2015 00:00:00 GMT+0500 (Pakistan Standard Time)"

当我使用

格式解析它时
SimpleDateFormat sdf = new SimpleDateFormat(EEE MMM dd yyyy HH:mm:ss zZ (zzzz))

我收到无法解析的日期异常,这显然意味着我的格式有误。有人能告诉我什么是正确的格式吗?为“(巴基斯坦标准时间)”写什么。

这是一种解析日期的方法:

public class Test {

    static final String sample_date = "Sat May 02 2015 00:00:00 GMT+0500 (Pakistan Standard Time)".replace("GMT", "")
            .replace(" (Pakistan Standard Time)", "");

    public static void main(String[] args) throws ParseException {

        SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd yyyy HH:mm:ss Z");
        ParsePosition position = new ParsePosition(0);
        Date d = sdf.parse(sample_date, position);
        System.out.println(d);
        System.out.println(position);
        if (position.getErrorIndex() != -1) {
            System.out.println(sample_date.substring(position.getErrorIndex()));
        }
        System.out.println(sdf.parse(sample_date));
    }
}

参考:Java - unparseable date, need format to match "GMT-0400"