MCPcopy Index your code
hub / github.com/python/cpython / _strptime_datetime_datetime

Function _strptime_datetime_datetime

Lib/_strptime.py:830–840  ·  view source on GitHub ↗

Return a datetime instance based on the input string and the format string.

(cls, data_string, format="%a %b %d %H:%M:%S %Y")

Source from the content-addressed store, hash-verified

828 return cls(*args, tz)
829
830def _strptime_datetime_datetime(cls, data_string, format="%a %b %d %H:%M:%S %Y"):
831 """Return a datetime instance based on the input string and the
832 format string."""
833 tt, fraction, gmtoff_fraction = _strptime(data_string, format)
834 tzname, gmtoff = tt[-2:]
835 args = tt[:6] + (fraction,)
836 if gmtoff is None:
837 return cls(*args)
838 else:
839 tz = _parse_tz(tzname, gmtoff, gmtoff_fraction)
840 return cls(*args, tz)

Callers

nothing calls this directly

Calls 3

_strptimeFunction · 0.85
_parse_tzFunction · 0.85
clsClass · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…