def convert_time(ut):
    """
    Convert the sun_time float value to a string.
    """
    if ut < 0:
        return "XX:XX:XX"
    hrs = int(ut)
    mns = int((ut - hrs)*60)
    secs = int((ut - hrs - mns/60.0)*3600)

    return "%02u:%02u:%02u" % (hrs, mns, secs)