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

Function _strptime_datetime_time

Lib/_strptime.py:800–810  ·  view source on GitHub ↗

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

(cls, data_string, format="%H:%M:%S")

Source from the content-addressed store, hash-verified

798 return datetime_timezone(tzdelta)
799
800def _strptime_datetime_time(cls, data_string, format="%H:%M:%S"):
801 """Return a time instance based on the input string and the
802 format string."""
803 tt, fraction, gmtoff_fraction = _strptime(data_string, format)
804 tzname, gmtoff = tt[-2:]
805 args = tt[3:6] + (fraction,)
806 if gmtoff is None:
807 return cls(*args)
808 else:
809 tz = _parse_tz(tzname, gmtoff, gmtoff_fraction)
810 return cls(*args, tz)
811
812def _strptime_datetime_datetime(cls, data_string, format="%a %b %d %H:%M:%S %Y"):
813 """Return a datetime instance based on the input string and the

Callers

nothing calls this directly

Calls 3

_strptimeFunction · 0.85
_parse_tzFunction · 0.85
clsClass · 0.50

Tested by

no test coverage detected