MCPcopy Index your code
hub / github.com/kubernetes-client/python / format_rfc3339

Function format_rfc3339

kubernetes/base/config/dateutil.py:103–107  ·  view source on GitHub ↗
(date_time)

Source from the content-addressed store, hash-verified

101
102
103def format_rfc3339(date_time):
104 if date_time.tzinfo is None:
105 date_time = date_time.replace(tzinfo=UTC)
106 date_time = date_time.astimezone(UTC)
107 return date_time.strftime('%Y-%m-%dT%H:%M:%SZ')

Callers 3

test_format_rfc3339Method · 0.70
_refresh_gcp_tokenMethod · 0.70

Calls 1

replaceMethod · 0.45

Tested by 2

test_format_rfc3339Method · 0.56