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

Method utcoffset

Lib/_pydatetime.py:2223–2230  ·  view source on GitHub ↗

Return the timezone offset as timedelta positive east of UTC (negative west of UTC).

(self)

Source from the content-addressed store, hash-verified

2221 return _strptime._strptime_datetime_datetime(cls, date_string, format)
2222
2223 def utcoffset(self):
2224 """Return the timezone offset as timedelta positive east of UTC (negative west of
2225 UTC)."""
2226 if self._tzinfo is None:
2227 return None
2228 offset = self._tzinfo.utcoffset(self)
2229 _check_utc_offset("utcoffset", offset)
2230 return offset
2231
2232 def tzname(self):
2233 """Return the timezone name.

Callers 4

utctimetupleMethod · 0.95
isoformatMethod · 0.95
_cmpMethod · 0.95
__sub__Method · 0.95

Calls 2

_check_utc_offsetFunction · 0.85
utcoffsetMethod · 0.45

Tested by

no test coverage detected