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

Method nondst_folds

Lib/test/datetimetester.py:6611–6616  ·  view source on GitHub ↗

Find all folds with the same value of isdst on both sides of the transition.

(self)

Source from the content-addressed store, hash-verified

6609 yield (EPOCH_NAIVE + timedelta(seconds=t)), shift
6610
6611 def nondst_folds(self):
6612 """Find all folds with the same value of isdst on both sides of the transition."""
6613 for (_, prev_ti), (t, ti) in pairs(zip(self.ut, self.ti)):
6614 shift = ti[0] - prev_ti[0]
6615 if shift < ZERO and ti[1] == prev_ti[1]:
6616 yield _utcfromtimestamp(datetime, t,), -shift, prev_ti[2], ti[2]
6617
6618 @classmethod
6619 def print_all_nondst_folds(cls, same_abbr=False, start_year=1):

Callers 1

Calls 1

pairsFunction · 0.85

Tested by

no test coverage detected