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

Method dst

Lib/_pydatetime.py:1671–1684  ·  view source on GitHub ↗

Return 0 if DST is not in effect, or the DST offset (as timedelta positive eastward) if DST is in effect. This is purely informational; the DST offset has already been added to the UTC offset returned by utcoffset() if applicable, so there's no need to consult dst()

(self)

Source from the content-addressed store, hash-verified

1669 return name
1670
1671 def dst(self):
1672 """Return 0 if DST is not in effect, or the DST offset (as timedelta
1673 positive eastward) if DST is in effect.
1674
1675 This is purely informational; the DST offset has already been added to
1676 the UTC offset returned by utcoffset() if applicable, so there's no
1677 need to consult dst() unless you're interested in displaying the DST
1678 info.
1679 """
1680 if self._tzinfo is None:
1681 return None
1682 offset = self._tzinfo.dst(None)
1683 _check_utc_offset("dst", offset)
1684 return offset
1685
1686 def replace(self, hour=None, minute=None, second=None, microsecond=None,
1687 tzinfo=True, *, fold=None):

Callers 2

fromutcMethod · 0.45
dstMethod · 0.45

Calls 1

_check_utc_offsetFunction · 0.85

Tested by

no test coverage detected