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

Method utcoffset

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

1568 # Timezone functions
1569
1570 def utcoffset(self):
1571 """Return the timezone offset as timedelta, positive east of UTC
1572 (negative west of UTC)."""
1573 if self._tzinfo is None:
1574 return None
1575 offset = self._tzinfo.utcoffset(None)
1576 _check_utc_offset("utcoffset", offset)
1577 return offset
1578
1579 def tzname(self):
1580 """Return the timezone name.

Callers 10

_cmpMethod · 0.95
_tzstrMethod · 0.95
_wrap_strftimeFunction · 0.45
fromutcMethod · 0.45
__hash__Method · 0.45
astimezoneMethod · 0.45
utcoffsetMethod · 0.45
_cmpMethod · 0.45
__sub__Method · 0.45
__hash__Method · 0.45

Calls 1

_check_utc_offsetFunction · 0.85

Tested by

no test coverage detected