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

Method dst

Lib/test/datetimetester.py:6531–6537  ·  view source on GitHub ↗
(self, dt)

Source from the content-addressed store, hash-verified

6529 return self._find_ti(dt, 0)
6530
6531 def dst(self, dt):
6532 isdst = self._find_ti(dt, 1)
6533 # XXX: We cannot accurately determine the "save" value,
6534 # so let's return 1h whenever DST is in effect. Since
6535 # we don't use dst() in fromutc(), it is unlikely that
6536 # it will be needed for anything more than bool(dst()).
6537 return ZERO if isdst else HOUR
6538
6539 def tzname(self, dt):
6540 return self._find_ti(dt, 2)

Callers 15

test_dstMethod · 0.45
test_aware_datetimeMethod · 0.45
test_argument_passingMethod · 0.45
test_tzinfo_classesMethod · 0.45
test_zonesMethod · 0.45
checkinsideMethod · 0.45
checkoutsideMethod · 0.45
fromutcMethod · 0.45
test_dstMethod · 0.45
test_utcMethod · 0.45

Calls 1

_find_tiMethod · 0.95

Tested by

no test coverage detected