Set the instance's timezone from a string or object.
(self, tz: str | Timezone | FixedTimezone)
| 343 | ) |
| 344 | |
| 345 | def in_timezone(self, tz: str | Timezone | FixedTimezone) -> Self: |
| 346 | """ |
| 347 | Set the instance's timezone from a string or object. |
| 348 | """ |
| 349 | tz = pendulum._safe_timezone(tz) |
| 350 | |
| 351 | dt = self |
| 352 | if not self.timezone: |
| 353 | dt = dt.replace(fold=1) |
| 354 | |
| 355 | return tz.convert(dt) |
| 356 | |
| 357 | def in_tz(self, tz: str | Timezone | FixedTimezone) -> Self: |
| 358 | """ |