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

Class DST

Lib/test/datetimetester.py:5231–5237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5229 # TestDateTime tested most of this. datetime adds a twist to the
5230 # DST flag.
5231 class DST(tzinfo):
5232 def __init__(self, dstvalue):
5233 if isinstance(dstvalue, int):
5234 dstvalue = timedelta(minutes=dstvalue)
5235 self.dstvalue = dstvalue
5236 def dst(self, dt):
5237 return self.dstvalue
5238
5239 cls = self.theclass
5240 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