3
0
Fork 0

feat: add "complete" (sic) timezone support

at least for now, this is enough to let admin define the global
default timezone for app, and override system local timezone.

eventually should support per-user timezone..some day..
This commit is contained in:
Lance Edgar 2025-12-16 22:52:33 -06:00
parent 286c683c93
commit 7fcb331806
10 changed files with 274 additions and 93 deletions

View file

@ -1663,6 +1663,9 @@ class TestMasterView(WebTestCase):
def test_configure(self):
self.pyramid_config.include("wuttaweb.views.common")
self.pyramid_config.include("wuttaweb.views.auth")
self.pyramid_config.add_route(
"appinfo.check_timezone", "/appinfo/check-timezone"
)
model = self.app.model
# mock settings
@ -1697,6 +1700,7 @@ class TestMasterView(WebTestCase):
def get_context(**kw):
kw = original_context(**kw)
kw["menu_handlers"] = []
kw["default_timezone"] = "UTC"
return kw
with patch.object(view, "configure_get_context", new=get_context):