def rets_date(py_date):
    """
    Converts a Python datetime into a RETS (ISO 8601 format) date

    :param py_date: a Python datetime
    :type pydate: date
    :rtype: str
    :return: py_date as a string in ISO 8601 format (no microseconds)
    """
    return py_date.replace(microsecond=0).isoformat()