feat(gui): status-bar date follows the system locale (#3511)#3690
Conversation
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>
There was a problem hiding this comment.
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>
Summary
Closes #3511. The bottom-right status-bar date label was hardcoded to ISO
yyyy-MM-dd. It now formats the (UTC) date withQLocale::system().toString(date, QLocale::ShortFormat), so it matches the operator's desktop regional format: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
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