Skip to content

feat(gui): status-bar date follows the system locale (#3511)#3690

Merged
ten9876 merged 2 commits into
mainfrom
feat/locale-status-date
Jun 21, 2026
Merged

feat(gui): status-bar date follows the system locale (#3511)#3690
ten9876 merged 2 commits into
mainfrom
feat/locale-status-date

Conversation

@ten9876

@ten9876 ten9876 commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #3511. The bottom-right status-bar date label was hardcoded to ISO yyyy-MM-dd. It now formats the (UTC) date with QLocale::system().toString(date, QLocale::ShortFormat), so it matches the operator's desktop regional format:

  • Ireland → 21/06/2026, Germany → 21.06.2026, US → 6/21/2026, etc.

The time label is unchanged (HH:mm:ssZ, UTC).

Why it's not RFC-gated

This adopts the OS's configured regional preference rather than introducing a new AetherSDR-specific format/visual choice — an i18n correctness fix, not a default-UX/visual-design decision.

Test plan

  • Full app builds clean.
  • QLocale::system() ShortFormat is the standard locale date API; date remains the UTC date, only its display format follows the locale.

🤖 Generated with Claude Code

The bottom-right GPS/clock date label was hardcoded to ISO yyyy-MM-dd. Format
the (UTC) date with QLocale::system() ShortFormat instead, so it matches the
operator's desktop regional format (dd/mm/yyyy, dd.mm.yyyy, etc.). Time stays
HH:mm:ssZ (UTC).

Closes #3511.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ten9876 ten9876 requested a review from a team as a code owner June 20, 2026 15:51

@aethersdr-agent aethersdr-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ten9876 — this is a clean, tightly-scoped change. A single label format swap, QLocale is already included (MainWindow.cpp:244), the date stays UTC (utc.date()), and the time label is untouched. No convention, null-safety, or scope concerns.

One thing worth a look before merge:

QLocale::ShortFormat often produces a 2-digit year. On several locales Qt's short date format is M/d/yy / dd/MM/yy, so en_US tends to render 6/21/26 rather than the 6/21/2026 in the PR description, and many EU locales likewise drop to 26. That's a slight loss of precision versus the old unambiguous yyyy-MM-dd, and it's easy to misread which two digits are the year. If you'd prefer to keep a 4-digit year while still honoring locale field order, you can build the format from the locale instead:

const QLocale loc = QLocale::system();
QString fmt = loc.dateFormat(QLocale::ShortFormat);
fmt.replace("yy", "yyyy").replace("yyyyyy", "yyyy"); // normalize if already 4-digit
m_gpsDateLabel->setText(loc.toString(utc.date(), fmt));

Entirely optional — if the team is fine with the locale's native short form (2-digit year included), the current code is correct as-is.

Minor: it may read slightly oddly to have a locale-formatted date next to a Z-suffixed UTC time, but since the date is still the UTC date this is a reasonable trade and not blocking.

Nice i18n fix overall.


🤖 aethersdr-agent · cost: $1.1176 · model: claude-opus-4-8

…view)

QLocale::ShortFormat is 2-digit-year on many locales (en_US → 6/21/26), which
loses precision vs the old ISO date and is easy to misread. Build the date
format from the locale's short format but force a 4-digit year (yy → yyyy),
preserving regional field order while keeping the full year — which is what
#3511 actually wanted (regional order, not year truncation).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ten9876 ten9876 merged commit 9e4a218 into main Jun 21, 2026
6 checks passed
@ten9876 ten9876 deleted the feat/locale-status-date branch June 21, 2026 03:18
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.

Follow system locale for status-bar date format instead of hardcoded yyyy-mm-dd

1 participant