Here you can find the source of changeSecondsToTime(long seconds)
public static long[] changeSecondsToTime(long seconds)
//package com.java2s; //License from project: Apache License public class Main { public static long[] changeSecondsToTime(long seconds) { long hour = seconds / 3600; long minute = (seconds - hour * 3600) / 60; long second = (seconds - hour * 3600 - minute * 60); return new long[] { hour, minute, second }; }// ww w. j a v a 2 s .c om }