Return either our local timezone or the provided timezone.
(self, tzinfo: tzinfo | None = None)
| 127 | """ |
| 128 | |
| 129 | def tz_or_local(self, tzinfo: tzinfo | None = None) -> tzinfo: |
| 130 | """Return either our local timezone or the provided timezone.""" |
| 131 | |
| 132 | # pylint: disable=redefined-outer-name |
| 133 | if tzinfo is None: |
| 134 | return self.local |
| 135 | return self.get_timezone(tzinfo) |
| 136 | |
| 137 | def to_local(self, dt: datetime, local=None, orig=None): |
| 138 | """Converts a datetime to the local timezone.""" |