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

Method dst

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

Source from the content-addressed store, hash-verified

6716 return self._find_ti(dt, 0)
6717
6718 def dst(self, dt):
6719 isdst = self._find_ti(dt, 1)
6720 # XXX: We cannot accurately determine the "save" value,
6721 # so let's return 1h whenever DST is in effect. Since
6722 # we don't use dst() in fromutc(), it is unlikely that
6723 # it will be needed for anything more than bool(dst()).
6724 return ZERO if isdst else HOUR
6725
6726 def tzname(self, dt):
6727 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