I am trying to convert XMLGregorian Calendar to java.util.Date in GMT.But following method gives me same date.It could not convert the date. Can you please look at the below code and tell me where I am doing wrong ?
try {
SimpleDateFormat dateFormatGmt = new SimpleDateFormat("yyyy-MMM-dd HH:MM");
dateFormatGmt.setTimeZone(TimeZone.getTimeZone("UTC"));
return dateFormatGmt.parse(dateFormatGmt.format(date));
} catch (ParseException e) {
e.printStackTrace();
return null;
}