from datetime import datetime


def df_military_time(time):
    """
    Format datetime object to military time

    :param datetime.datetime datetime: Datetime object to convert
    :returns: Military time formatted string
    :rtype: str
    """
    if not isinstance(time, datetime):
        raise ValueError(f"Invalid type '{type(time)}', expected 'datetime'")
    return time.strftime('%H:%M:%S')