MCPcopy Index your code
hub / github.com/RustPython/RustPython / _date_to_string

Function _date_to_string

Lib/plistlib.py:160–166  ·  view source on GitHub ↗
(d, aware_datetime)

Source from the content-addressed store, hash-verified

158
159
160def _date_to_string(d, aware_datetime):
161 if aware_datetime:
162 d = d.astimezone(datetime.UTC)
163 return '%04d-%02d-%02dT%02d:%02d:%02dZ' % (
164 d.year, d.month, d.day,
165 d.hour, d.minute, d.second
166 )
167
168def _escape(text):
169 m = _controlCharPat.search(text)

Callers 1

write_valueMethod · 0.85

Calls 1

astimezoneMethod · 0.80

Tested by

no test coverage detected