I have a small method that returns a string with the time of a date. This works fine when I show the start and end time, but the difference appears wrong. Example: Start Time = 8:26:11, End Time = 8:26:13 and Difference = 7: 0: 1.
My method is:
private String horaTexto(Long fecha) {
java.util.Calendar c = java.util.Calendar.getInstance();
Date d = new Date(fecha);
c.setTime(d);
return c.get(java.util.Calendar.HOUR) + ":" + c.get(java.util.Calendar.MINUTE) + ":" + c.get(java.util.Calendar.SECOND);
}