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

Method utcoffset

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

1647 # Timezone functions
1648
1649 def utcoffset(self):
1650 """Return the timezone offset as timedelta, positive east of UTC
1651 (negative west of UTC)."""
1652 if self._tzinfo is None:
1653 return None
1654 offset = self._tzinfo.utcoffset(None)
1655 _check_utc_offset("utcoffset", offset)
1656 return offset
1657
1658 def tzname(self):
1659 """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