(value)
return converted
Convert to datetime.
Convert to datetime.
Convert to datetime .
def convert_to_datetime(value):
    """Convert to datetime."""

    if isinstance(value, struct_time):
        converted = datetime.datetime(
            year=value.tm_year,
            month=value.tm_mon,
            day=value.tm_mday,
            hour=value.tm_hour,
            minute=value.tm_min,
            second=value.tm_sec
        )
    else:
        converted = value
    return converted
def convert_to_datetime ( value ) : if isinstance ( value , struct_time ) : converted = datetime . datetime ( year = value . tm_year , month = value . tm_mon , day = value . tm_mday , hour = value . tm_hour , minute = value . tm_min , second = value . tm_sec ) else : converted = value return converted