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)
| 2243 | return name |
| 2244 | |
| 2245 | def dst(self): |
| 2246 | """Return 0 if DST is not in effect, or the DST offset (as timedelta |
| 2247 | positive eastward) if DST is in effect. |
| 2248 | |
| 2249 | This is purely informational; the DST offset has already been added to |
| 2250 | the UTC offset returned by utcoffset() if applicable, so there's no |
| 2251 | need to consult dst() unless you're interested in displaying the DST |
| 2252 | info. |
| 2253 | """ |
| 2254 | if self._tzinfo is None: |
| 2255 | return None |
| 2256 | offset = self._tzinfo.dst(self) |
| 2257 | _check_utc_offset("dst", offset) |
| 2258 | return offset |
| 2259 | |
| 2260 | # Comparisons of datetime objects with other. |
| 2261 |
no test coverage detected