def format_rfc3339(datetime_instance=None):
    return datetime_instance.isoformat("T") + "Z"
Formats a datetime per RFC 3339.
dataset/ETHPy150Open GoogleCloudPlatform/python-docs-samples/monitoring/api/v2/lightweight_custom_metric.py/format_rfc3339