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 d
(self)
| 2081 | return name |
| 2082 | |
| 2083 | def dst(self): |
| 2084 | """Return 0 if DST is not in effect, or the DST offset (as timedelta |
| 2085 | positive eastward) if DST is in effect. |
| 2086 | |
| 2087 | This is purely informational; the DST offset has already been added to |
| 2088 | the UTC offset returned by utcoffset() if applicable, so there's no |
| 2089 | need to consult dst() unless you're interested in displaying the DST |
| 2090 | info. |
| 2091 | """ |
| 2092 | if self._tzinfo is None: |
| 2093 | return None |
| 2094 | offset = self._tzinfo.dst(self) |
| 2095 | _check_utc_offset("dst", offset) |
| 2096 | return offset |
| 2097 | |
| 2098 | # Comparisons of datetime objects with other. |
| 2099 |
no test coverage detected