def isoformat(dt):
    """
    Function to act as ``datetime.datetime`` instance encoder

    :param dt: instance of ``datetime.datetime``
    :return:   ISO 8601 formatted string
    :rtype:    str

    """
    return dt.isoformat()