From 62e0568646389ab17751a74c751fa654f3aa4d95 Mon Sep 17 00:00:00 2001 From: Louis King Date: Mon, 9 Feb 2026 00:46:39 +0000 Subject: [PATCH] Use timezone abbreviation (GMT, EST) instead of full name in headers Co-Authored-By: Claude Opus 4.5 --- src/meshcore_hub/web/app.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/meshcore_hub/web/app.py b/src/meshcore_hub/web/app.py index 292aa3a..f924ffd 100644 --- a/src/meshcore_hub/web/app.py +++ b/src/meshcore_hub/web/app.py @@ -215,6 +215,13 @@ def create_app( for name, func in tz_filters.items(): templates.env.filters[name] = func + # Compute timezone abbreviation (e.g., "GMT", "EST", "PST") + try: + tz = ZoneInfo(settings.tz) + app.state.timezone_abbr = datetime.now(tz).strftime("%Z") + except Exception: + app.state.timezone_abbr = "UTC" + app.state.templates = templates # Initialize page loader for custom markdown pages @@ -398,5 +405,5 @@ def get_network_context(request: Request) -> dict: "custom_pages": custom_pages, "logo_url": request.app.state.logo_url, "version": __version__, - "timezone": request.app.state.timezone, + "timezone": request.app.state.timezone_abbr, }