Here you can find the source of convertMillisToHHMMSS(long millis)
public static String convertMillisToHHMMSS(long millis)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; import java.util.TimeZone; public class Main { public static String convertMillisToHHMMSS(long millis) { TimeZone tz = TimeZone.getTimeZone("UTC"); SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss"); df.setTimeZone(tz);//from w w w. j av a 2 s. com return df.format(new Date(millis)); } }