Skip to content

Commit 62e0568

Browse files
Use timezone abbreviation (GMT, EST) instead of full name in headers
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b4da93e commit 62e0568

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/meshcore_hub/web/app.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,13 @@ def create_app(
215215
for name, func in tz_filters.items():
216216
templates.env.filters[name] = func
217217

218+
# Compute timezone abbreviation (e.g., "GMT", "EST", "PST")
219+
try:
220+
tz = ZoneInfo(settings.tz)
221+
app.state.timezone_abbr = datetime.now(tz).strftime("%Z")
222+
except Exception:
223+
app.state.timezone_abbr = "UTC"
224+
218225
app.state.templates = templates
219226

220227
# Initialize page loader for custom markdown pages
@@ -398,5 +405,5 @@ def get_network_context(request: Request) -> dict:
398405
"custom_pages": custom_pages,
399406
"logo_url": request.app.state.logo_url,
400407
"version": __version__,
401-
"timezone": request.app.state.timezone,
408+
"timezone": request.app.state.timezone_abbr,
402409
}

0 commit comments

Comments
 (0)