Please refer below main method:
public static void main(String[] args) {
Duration dur = new Duration();
dur.setHours(17);
dur.setMinutes(30);
SimpleDateFormat simpDate = new SimpleDateFormat("kk:mm");
System.out.println(simpDate.format(dur.getAsCalendar().getTime()));
}
When i run this i got output 05:30 and expected output is 17:30. Even i tried with "HH:mm" format but not getting expected output. it converts to 12 hours format rather than 24 hours format.
Please help.