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

Method dst

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

2200 return name
2201
2202 def dst(self):
2203 """Return 0 if DST is not in effect, or the DST offset (as timedelta
2204 positive eastward) if DST is in effect.
2205
2206 This is purely informational; the DST offset has already been added to
2207 the UTC offset returned by utcoffset() if applicable, so there's no
2208 need to consult dst() unless you're interested in displaying the DST
2209 info.
2210 """
2211 if self._tzinfo is None:
2212 return None
2213 offset = self._tzinfo.dst(self)
2214 _check_utc_offset("dst", offset)
2215 return offset
2216
2217 # Comparisons of datetime objects with other.
2218

Callers 1

timetupleMethod · 0.95

Calls 2

_check_utc_offsetFunction · 0.85
dstMethod · 0.45

Tested by

no test coverage detected