def hourToHHMMSS(h):
    """Given a floating hour time, return a string in HH:MM:SS format (e.g. 14.5 becomes '14:30:00')"""
    assert h<24
    hours = int(h)
    minsF = (h-int(h))*60.0
    mins = int(minsF)
    secs = int((minsF-mins)*60.0)
    return "%02d:%02d:%02d" % (hours, mins, secs)