Return the local system timezone for the application.
(self)
| 162 | |
| 163 | @cached_property |
| 164 | def local(self) -> tzinfo: |
| 165 | """Return the local system timezone for the application.""" |
| 166 | try: |
| 167 | timezone = get_localzone() |
| 168 | except Exception as ex: |
| 169 | timezone = None |
| 170 | logger.warning("Failed to retrieve local timezone (%s): %s", type(ex).__name__, ex) |
| 171 | if timezone is None: |
| 172 | return LocalTimezone() |
| 173 | return timezone |
| 174 | |
| 175 | @cached_property |
| 176 | def utc(self) -> tzinfo: |
no test coverage detected