Skip to content

Use locale-aware date/time formatting throughout UI - #48

Merged
erikdarlingdata merged 2 commits into
devfrom
feature/41-locale-aware-datetime
Feb 15, 2026
Merged

erikdarlingdata merged 2 commits into
devfrom
feature/41-locale-aware-datetime

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

Summary

Partial fix for #41 — Replaces hardcoded US-style date formats with locale-aware "g" (general date/time) format specifier across both Dashboard and Lite.

Changes

Dashboard:

  • ServerConnectionStatus.cs — "Checked" and "Online since" sidebar timestamps (the "MMM d, h:mm tt" that showed as feb. 13, 12:23 a.m. for Norwegian users)
  • ManageServersWindow.xaml — Last Connected column (MM/dd/yyyy HH:mm)
  • CollectorScheduleWindow.xaml — Last Run / Next Run columns (MM/dd HH:mm)

Lite:

  • ServerConnectionStatus.cs — same sidebar timestamps
  • LocalDataService.CollectionHealth.cs — all Collection Health formatted timestamps (MM/dd HH:mm:ss)

Not included

The time range picker (AM/PM hour list) needs a separate design discussion — it generates a hardcoded list of "12 AM", "1 AM", etc. that would need to be rethought for 24-hour locales.

Test plan

  • dotnet build Dashboard -c Debug — builds clean
  • dotnet build Lite -c Debug — builds clean
  • Launch Dashboard — verify sidebar shows locale-appropriate timestamps
  • Launch Lite — verify Collection Health timestamps respect locale
  • On a non-US locale: confirm dates use local format (e.g. 15.02.2026 18:42 for Norwegian)

🤖 Generated with Claude Code

erikdarlingdata and others added 2 commits February 15, 2026 16:06
Replace hardcoded US-style date formats (MM/dd, MMM d, h:mm tt) with the
"g" general format specifier which respects the user's system locale.

Dashboard:
- ServerConnectionStatus: "Checked" and "Online since" timestamps
- ManageServersWindow: Last Connected column
- CollectorScheduleWindow: Last Run and Next Run columns

Lite:
- ServerConnectionStatus: same "Checked" and "Online since" timestamps
- CollectorHealthRow/CollectionLogRow: all formatted timestamp properties

Does not change the time range picker (AM/PM hour list) — that needs a
separate design discussion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change hour picker from "12 AM", "1 AM", ... "11 PM" to
"00:00", "01:00", ... "23:00". Consistent with chart axis labels,
SQL Server log conventions, and international users.

Parse logic is index-based (SelectedIndex 0-23) so no functional change.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erikdarlingdata
erikdarlingdata merged commit f5caef2 into dev Feb 15, 2026
1 check passed
@erikdarlingdata
erikdarlingdata deleted the feature/41-locale-aware-datetime branch February 20, 2026 13:20
erikdarlingdata added a commit that referenced this pull request Aug 14, 2026
…adder

dev moved 10 rungs (V61 -> V71) while this sat, so the collision the V61 doc
comment predicted actually happened -- and it surfaced exactly as that comment
said it would, as a conflict on the migration list rather than as a silent gap.
Renumbered to V72, immediately above dev's newest, no gap: the runner skips any
rung at or below the store's stamped version, so a gap is skipped SILENTLY on
every upgraded store while a collision is loud.

Merged rather than rebased: same result, no force-push over 26 commits, and the
10-file conflict surface gets resolved once instead of per commit.

Resolutions:

- StorageVersion.SchemaVersion 61 -> 72.
- The five conflicting test files take DEV's side wholesale. The branch had only
  bumped literal version pins in them; dev independently replaced those literals
  with the invariant form (Assert.Equal(StorageVersion.SchemaVersion, ...)) and
  made ViewerDataServiceTests build its all-true probe call by REFLECTION so the
  arity tracks the signature. That is strictly better than what the branch was
  reaching for -- the branch's own comment called the literal form "a recurring
  four-test failure".
- ViewerDataService: dev's four new sentinels kept, the plan-map probe appended as
  #48, and its ladder arm returns 72 ABOVE dev's V71 arm because arms evaluate
  newest-first. The arm's comment deliberately does NOT name the table in prose --
  dev's V71 comment records that a prose mention exempts a table from
  ViewerCollectorCoverageTests' ratchet, which strips information_schema probe
  lines but cannot strip a comment.

One semantic conflict git could not see: DarlingCollectorRunner.cs auto-merged
cleanly but left the #2210 plan-fetch call passing `sqlConnection`, which #2213's
provider seam renamed and re-typed to a provider-neutral DbConnection. Resolved as
`targetConnection is SqlConnection planFetchConnection`, which narrows the type the
signature needs and gates the engine in one expression -- the enumerated path
serves PostgreSQL targets now, and while query_store declares
TargetEngine = SqlServer, relying on the catalog for that would put the invariant
somewhere else.

Full solution builds clean, 0 warnings.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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