(self)
| 1954 | microsecond, tzinfo, fold=fold) |
| 1955 | |
| 1956 | def _local_timezone(self): |
| 1957 | if self.tzinfo is None: |
| 1958 | ts = self._mktime() |
| 1959 | else: |
| 1960 | ts = (self - _EPOCH) // timedelta(seconds=1) |
| 1961 | localtm = _time.localtime(ts) |
| 1962 | local = datetime(*localtm[:6]) |
| 1963 | # Extract TZ data |
| 1964 | gmtoff = localtm.tm_gmtoff |
| 1965 | zone = localtm.tm_zone |
| 1966 | return timezone(timedelta(seconds=gmtoff), zone) |
| 1967 | |
| 1968 | def astimezone(self, tz=None): |
| 1969 | if tz is None: |
no test coverage detected