I trying a simple exercise to converter time from 12 to 24, below my code:
String result = LocalTime.parse(time, DateTimeFormatter.ofPattern("hh:mm:ssa")).toString();
System.out.println("result = " + result);
The problem is when the seconds are 0 the method truncate the seconds, for example with time 12:00:00AM the result is 00:00, I want it to be 00:00:00.
Thanks.