def format_time(seconds):
    """
    Formats a time in seconds
    :param seconds:
    :return: Time formatted as hh:mm:ss
    """
    format_zero = lambda x: str(int(x)) if int(x) > 9 else "0{}".format(int(x))
    m, s = divmod(seconds, 60)
    h, m = divmod(m, 60)
    return "{}:{}:{}".format(format_zero(h), format_zero(m), format_zero(s))