Java Second Format changeSecondsToTime(long seconds)

Here you can find the source of changeSecondsToTime(long seconds)

Description

change Seconds To Time

License

Apache License

Declaration

public static long[] changeSecondsToTime(long seconds) 

Method Source Code

//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
}

Related

  1. _toSeconds(String strTime)
  2. addSecondCa(String d1, int timeSpan, String format)
  3. calculateTimeInSeconds(long startTimeInMilliseconds, long endTimeInMilliseconds)
  4. compareDate(String fistDate, String secondDate, String format)
  5. elapsedSeconds(long startTime)
  6. elapsedSeconds2(long milli)
  7. formatMiliSeconds(long time)