MCPcopy Index your code
hub / github.com/python/cpython / dst

Method dst

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

1704 return name
1705
1706 def dst(self):
1707 """Return 0 if DST is not in effect, or the DST offset (as timedelta
1708 positive eastward) if DST is in effect.
1709
1710 This is purely informational; the DST offset has already been added to
1711 the UTC offset returned by utcoffset() if applicable, so there's no
1712 need to consult dst() unless you're interested in displaying the DST
1713 info.
1714 """
1715 if self._tzinfo is None:
1716 return None
1717 offset = self._tzinfo.dst(None)
1718 _check_utc_offset("dst", offset)
1719 return offset
1720
1721 def replace(self, hour=None, minute=None, second=None, microsecond=None,
1722 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