trying to parse the String "2019-08-21 9:04:08" into a Calender object.
I am getting the result Mon Dec 31 09:04:08 GMT 2018 from calender.getTime()
Here is how I parse it
Calendar cal = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat("YYYY-MM-DD hh:mm:ss");
try {
cal.setTime(sdf.parse("2019-08-21 9:04:08"));
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}// all done
return cal;
}