from __future__ import annotations from django.conf import settings from django.utils import timezone #: Quick-pick zones for the navbar switcher; override with YKSA_COMMON_TIMEZONES. DEFAULT_COMMON_TIMEZONES = ["UTC", "Europe/Moscow", "Asia/Yakutsk", "Asia/Tokyo"] def ui_preferences(request): return { "current_timezone_name": timezone.get_current_timezone_name(), "common_timezones": getattr( settings, "YKSA_COMMON_TIMEZONES", DEFAULT_COMMON_TIMEZONES ), "cookie_consent": request.COOKIES.get("yksa_cookie_consent", ""), }