(self, ts, year)
| 487 | return self.dst if isdst else self.std |
| 488 | |
| 489 | def _get_trans_info_fromutc(self, ts, year): |
| 490 | start, end = self.transitions(year) |
| 491 | start -= self.std.utcoff.total_seconds() |
| 492 | end -= self.dst.utcoff.total_seconds() |
| 493 | |
| 494 | if start < end: |
| 495 | isdst = start <= ts < end |
| 496 | else: |
| 497 | isdst = not (end <= ts < start) |
| 498 | |
| 499 | # For positive DST, the ambiguous period is one dst_diff after the end |
| 500 | # of DST; for negative DST, the ambiguous period is one dst_diff before |
| 501 | # the start of DST. |
| 502 | if self.dst_diff > 0: |
| 503 | ambig_start = end |
| 504 | ambig_end = end + self.dst_diff |
| 505 | else: |
| 506 | ambig_start = start |
| 507 | ambig_end = start - self.dst_diff |
| 508 | |
| 509 | fold = ambig_start <= ts < ambig_end |
| 510 | |
| 511 | return (self.dst if isdst else self.std, fold) |
| 512 | |
| 513 | |
| 514 | def _post_epoch_days_before_year(year): |
nothing calls this directly
no test coverage detected