Home Convert Seconds to HH:MM:SS

    Convert Seconds to HH:MM:SS

    0

    The following will convert seconds to an HH:MM:SS format.

    To add the ‘s’ for seconds (it puts the time into perspective), use:

    For anything under a minute, you might want to strip the leading 00:00.

    While printing an ‘s’ gives the time a reference, you might want to keep the leading 00: at times even when there’s no hour. Use the following:

    ■ ■ ■

    Reference: PHP Manual, time() and date() .

    Shortt URL for this post: http://shor.tt/1XVb