I want to convert the second/milliseconds in this format \"HH:mm:ss\" (for esamples, from 5 seconds to 00:00:05). I tried to get that format in this way:
int mil
I got this to work. Let me know if it works for you. Seems like a lot of lines to do something seemingly simple..
int millis = 5000;
TimeZone tz = TimeZone.getTimeZone("UTC");
SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss");
df.setTimeZone(tz);
String time = df.format(new Date(millis));
System.out.println(time);