I\'ve the following code:
SimpleDateFormat format = new SimpleDateFormat(\"EEE MMM dd HH:mm:ss z yyyy\");
String s2 = \"Mon Oct 19 19:52:21 IST 2015\";
Using IST
is dangerous as it could stand for Indian or Israel ST.
Assuming you meant Indian ST, try this:
SimpleDateFormat format = new SimpleDateFormat("EEE MMM dd HH:mm:ss z yyyy");
format.setTimeZone(TimeZone.getTimeZone("Asia/Calcutta"));
String s2 = "Mon Oct 19 19:52:21 IST 2015";
System.out.println(format.parse(s2));
Also, follow suggestion from @Meno's answer