def seconds_to_hms(t):
    """
    Convert t in seconds to an hh:mm:ss formatted string

    :param t: time value in seconds
    :type t: int or float

    :returns: hh:mm:ss formatted time string
    """
    min, sec = divmod(t, 60)
    hour, min = divmod(min, 60)

    return '{:0>2}:{:0>2}:{:0>2}'.format(int(hour), int(min), int(sec))