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

Class DST

Lib/test/datetimetester.py:5418–5424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5416 # TestDateTime tested most of this. datetime adds a twist to the
5417 # DST flag.
5418 class DST(tzinfo):
5419 def __init__(self, dstvalue):
5420 if isinstance(dstvalue, int):
5421 dstvalue = timedelta(minutes=dstvalue)
5422 self.dstvalue = dstvalue
5423 def dst(self, dt):
5424 return self.dstvalue
5425
5426 cls = self.theclass
5427 for dstvalue, flag in (-33, 1), (33, 1), (0, 0), (None, -1):

Callers 2

test_tzinfo_timetupleMethod · 0.85
test_utctimetupleMethod · 0.85

Calls

no outgoing calls

Tested by 2

test_tzinfo_timetupleMethod · 0.68
test_utctimetupleMethod · 0.68