Method
convert
(self, dt: _DT, raise_on_unknown_times: bool = False)
Source from the content-addressed store, hash-verified
| 183 | return self._name |
| 184 | |
| 185 | def convert(self, dt: _DT, raise_on_unknown_times: bool = False) -> _DT: |
| 186 | if dt.tzinfo is None: |
| 187 | return dt.__class__( |
| 188 | dt.year, |
| 189 | dt.month, |
| 190 | dt.day, |
| 191 | dt.hour, |
| 192 | dt.minute, |
| 193 | dt.second, |
| 194 | dt.microsecond, |
| 195 | tzinfo=self, |
| 196 | fold=0, |
| 197 | ) |
| 198 | |
| 199 | return cast("_DT", dt.astimezone(self)) |
| 200 | |
| 201 | def datetime( |
| 202 | self, |
Tested by
no test coverage detected