(self, when)
| 155 | return ZERO |
| 156 | |
| 157 | def fromutc(self, when): |
| 158 | assert when.tzinfo is self |
| 159 | start, end = us_dst_range(when.year) |
| 160 | start = start.replace(tzinfo=self) |
| 161 | end = end.replace(tzinfo=self) |
| 162 | std_time = when + self.stdoffset |
| 163 | dst_time = std_time + HOUR |
| 164 | if end <= dst_time < end + HOUR: |
| 165 | # Repeated hour |
| 166 | return std_time.replace(fold=1) |
| 167 | if std_time < start or dst_time >= end: |
| 168 | # Standard time |
| 169 | return std_time |
| 170 | if start <= std_time < end - HOUR: |
| 171 | # Daylight saving time |
| 172 | return dst_time |
| 173 | |
| 174 | |
| 175 | Eastern = USTimeZone(-5, "Eastern", "EST", "EDT") |
nothing calls this directly
no test coverage detected