Here you can find the source of milliSekundsToTime(long millisecond)
private static final long[] milliSekundsToTime(long millisecond)
//package com.java2s; //License from project: Apache License public class Main { private static final long[] milliSekundsToTime(long millisecond) { long[] date = new long[4]; long oneDay = 24 * 60 * 60 * 1000; long oneHour = 60 * 60 * 1000; long oneMinute = 60 * 1000; long oneSecond = 1000; date[0] = Math.abs(millisecond / oneDay); millisecond -= (date[0] * oneDay); date[1] = Math.abs(millisecond / oneHour); millisecond -= (date[1] * oneHour); date[2] = Math.abs(millisecond / oneMinute); millisecond -= (date[2] * oneMinute); date[3] = Math.abs(millisecond / oneSecond); return date; }/* w w w .jav a2 s . co m*/ }