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

Method dst

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

(self)

Source from the content-addressed store, hash-verified

2081 return name
2082
2083 def dst(self):
2084 """Return 0 if DST is not in effect, or the DST offset (as timedelta
2085 positive eastward) if DST is in effect.
2086
2087 This is purely informational; the DST offset has already been added to
2088 the UTC offset returned by utcoffset() if applicable, so there's no
2089 need to consult dst() unless you're interested in displaying the DST
2090 info.
2091 """
2092 if self._tzinfo is None:
2093 return None
2094 offset = self._tzinfo.dst(self)
2095 _check_utc_offset("dst", offset)
2096 return offset
2097
2098 # Comparisons of datetime objects with other.
2099

Callers 1

timetupleMethod · 0.95

Calls 2

_check_utc_offsetFunction · 0.85
dstMethod · 0.45

Tested by

no test coverage detected