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

Method utcoffset

Lib/_pydatetime.py:2180–2187  ·  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

2178 return _strptime._strptime_datetime_datetime(cls, date_string, format)
2179
2180 def utcoffset(self):
2181 """Return the timezone offset as timedelta positive east of UTC (negative west of
2182 UTC)."""
2183 if self._tzinfo is None:
2184 return None
2185 offset = self._tzinfo.utcoffset(self)
2186 _check_utc_offset("utcoffset", offset)
2187 return offset
2188
2189 def tzname(self):
2190 """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