I have seen several questions like this but I can't quite get the conversion right. I want to convert a date like the following
20121116203036Z
to
2012-11-16 15:30:36
I have the following code
dateStringTime.set( year, mon-1 , day, hour, minute, second );
Date date = dateStringTime.getTime();
DateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
formatter.setTimeZone(TimeZone.getTimeZone("EST"));
String output = formatter.format();
return output;
which works but it gives me the below
2012-11-16 20:30:36
Any advice on how to get 15 instead of 20?