Return 0 if DST is not in effect, or the DST offset (as timedelta positive eastward) if DST is in effect. This is purely informational; the DST offset has already been added to the UTC offset returned by utcoffset() if applicable, so there's no need to consult dst()
(self)
| 2200 | return name |
| 2201 | |
| 2202 | def dst(self): |
| 2203 | """Return 0 if DST is not in effect, or the DST offset (as timedelta |
| 2204 | positive eastward) if DST is in effect. |
| 2205 | |
| 2206 | This is purely informational; the DST offset has already been added to |
| 2207 | the UTC offset returned by utcoffset() if applicable, so there's no |
| 2208 | need to consult dst() unless you're interested in displaying the DST |
| 2209 | info. |
| 2210 | """ |
| 2211 | if self._tzinfo is None: |
| 2212 | return None |
| 2213 | offset = self._tzinfo.dst(self) |
| 2214 | _check_utc_offset("dst", offset) |
| 2215 | return offset |
| 2216 | |
| 2217 | # Comparisons of datetime objects with other. |
| 2218 |
no test coverage detected