Skip to content

Add South Africa (SAST) timezone option and default; fix UTC-only clocks - #250

Open
Poid-ZA wants to merge 1 commit into
smittix:mainfrom
Poid-ZA:fix/sast-default-timezone
Open

Poid-ZA wants to merge 1 commit into
smittix:mainfrom
Poid-ZA:fix/sast-default-timezone

Conversation

@Poid-ZA

@Poid-ZA Poid-ZA commented Aug 11, 2026

Copy link
Copy Markdown

Summary

  • `InterceptTime` (the global timezone preference used across the app) only offered UTC / browser-local / US zones, defaulting to `US/Eastern`. Added `Africa/Johannesburg` (labelled SAST) as a selectable option in the settings modal and as the new default.

  • Fixed two clocks that bypassed `InterceptTime` entirely and always rendered raw UTC regardless of the user's preference:

    • the per-map HUD clock in `map-utils.js` (top-right overlay on every dashboard map)
    • the GPS fix-time readouts in `gps.js` (sidebar + visuals panel)

    Both now show local time (per `InterceptTime`, SAST by default) with UTC appended for reference, instead of UTC-only.

  • `templates/layout/base.html`'s header clock was fixed the same way for consistency, though no current route renders that template.

Non-SAST users are unaffected beyond the new default — anyone who already set a timezone preference in Settings keeps it (stored in `localStorage`); this only changes the out-of-the-box default and adds a previously-missing option.

Test plan

  • `node --check` on all three edited JS files
  • Manual review of `InterceptTime.onChange` wiring — no route currently renders `base.html`, so that portion is inert but consistent with the rest of the codebase

🤖 Generated with Claude Code

InterceptTime's global timezone preference only offered UTC, browser-local,
or US zones -- no way to select SAST, and it defaulted to US/Eastern. Added
Africa/Johannesburg (labelled SAST) as a selectable option and made it the
default, since this deployment and its primary user are South Africa-based.

Also fixed two clocks that bypassed InterceptTime entirely and hardcoded raw
UTC display regardless of user preference:
- map-utils.js's per-map HUD clock (top-right overlay)
- gps.js's GPS-fix timestamp readouts (sidebar + visuals panel)

Both now show the user's configured local time (SAST by default) with UTC
appended for reference, rather than UTC-only. templates/layout/base.html's
header clock (currently unused by any route, but defensively) was updated
the same way for consistency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant