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)
| 1704 | return name |
| 1705 | |
| 1706 | def dst(self): |
| 1707 | """Return 0 if DST is not in effect, or the DST offset (as timedelta |
| 1708 | positive eastward) if DST is in effect. |
| 1709 | |
| 1710 | This is purely informational; the DST offset has already been added to |
| 1711 | the UTC offset returned by utcoffset() if applicable, so there's no |
| 1712 | need to consult dst() unless you're interested in displaying the DST |
| 1713 | info. |
| 1714 | """ |
| 1715 | if self._tzinfo is None: |
| 1716 | return None |
| 1717 | offset = self._tzinfo.dst(None) |
| 1718 | _check_utc_offset("dst", offset) |
| 1719 | return offset |
| 1720 | |
| 1721 | def replace(self, hour=None, minute=None, second=None, microsecond=None, |
| 1722 | tzinfo=True, *, fold=None): |
no test coverage detected