MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _try

Function _try

tools/python-3.11.9-amd64/Lib/xmlrpc/client.py:267–271  ·  view source on GitHub ↗
(fmt)

Source from the content-addressed store, hash-verified

265# Issue #13305: different format codes across platforms
266_day0 = datetime(1, 1, 1)
267def _try(fmt):
268 try:
269 return _day0.strftime(fmt) == '0001'
270 except ValueError:
271 return False
272if _try('%Y'): # Mac OS X
273 def _iso8601_format(value):
274 return value.strftime("%Y%m%dT%H:%M:%S")

Callers 1

client.pyFile · 0.85

Calls 1

strftimeMethod · 0.45

Tested by

no test coverage detected