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

Method nondst_folds

Lib/test/datetimetester.py:6798–6803  ·  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

6796 yield (EPOCH_NAIVE + timedelta(seconds=t)), shift
6797
6798 def nondst_folds(self):
6799 """Find all folds with the same value of isdst on both sides of the transition."""
6800 for (_, prev_ti), (t, ti) in pairs(zip(self.ut, self.ti)):
6801 shift = ti[0] - prev_ti[0]
6802 if shift < ZERO and ti[1] == prev_ti[1]:
6803 yield _utcfromtimestamp(datetime, t,), -shift, prev_ti[2], ti[2]
6804
6805 @classmethod
6806 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