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

Method utcoffset

tools/python-3.11.9-amd64/Lib/datetime.py:2061–2068  ·  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

2059 return _strptime._strptime_datetime(cls, date_string, format)
2060
2061 def utcoffset(self):
2062 """Return the timezone offset as timedelta positive east of UTC (negative west of
2063 UTC)."""
2064 if self._tzinfo is None:
2065 return None
2066 offset = self._tzinfo.utcoffset(self)
2067 _check_utc_offset("utcoffset", offset)
2068 return offset
2069
2070 def tzname(self):
2071 """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