Initialize timezone settings for this context.
(self, use_tz: bool, timezone: str)
| 368 | set_global_context(self) |
| 369 | |
| 370 | def _init_timezone(self, use_tz: bool, timezone: str) -> None: |
| 371 | """Initialize timezone settings for this context.""" |
| 372 | self._use_tz = use_tz |
| 373 | self._timezone = timezone |
| 374 | # Set environment variables for backward compatibility |
| 375 | os.environ["USE_TZ"] = str(use_tz) |
| 376 | os.environ["TIMEZONE"] = timezone |
| 377 | _reset_timezone_cache() |
| 378 | |
| 379 | def _init_routers(self, routers: list[str | type] | None = None) -> None: |
| 380 | """Initialize database routers for this context.""" |
no test coverage detected