Repository navigation
Bug: quickfiler-session-metrics-twelve-hour-time-format #645
Description
Activity
Scope widening request: the date and time separators are culture-sensitive too
This issue was filed for the 12-hour
"hh:mm"format string. Feature review of
quickfiler-home-controller-metrics-442(finding CR-3) identified a second, adjacent defect at the
same sites, and recommends resolving the whole timestamp-content question here rather than in a
separate issue.The additional defect
In .NET custom date and time format strings,
/and:are not literals./is the date
separator placeholder and:is the time separator placeholder, and both resolve against
CultureInfo.CurrentCulture. None of the date/time format calls in the two metrics files passes
CultureInfo.InvariantCulture, so under a locale such asde-DE:SentDate.ToString("MM/dd/yyyy")renders06.30.2026, not06/30/2026- the time field's
:likewise becomes the locale's time separator
Affected sites, as of
bug/quickfiler-home-controller-metrics-442at6a1b9ca4:QuickFiler/Controllers/QfcHomeController.Metrics.cs:48QuickFiler/Controllers/QfcHomeController.Metrics.cs:125-127QuickFiler/Controllers/EfcHomeController.Metrics.cs:120-121
Why it was not fixed in #442 / #443 / #451
That feature's AC-16 deliberately scoped culture invariance to the six numeric format sites,
because a locale-dependent decimal separator changes2.00to2,00and therefore changes the CSV
field count — a shape defect. The date and time separators cannot introduce a comma, so they cannot
change the field count; they are a content defect, which is the same classification that put the
"hh:mm"problem into this issue rather than into that feature. The six numeric sites now pass
CultureInfo.InvariantCulture; the date and time calls were left untouched precisely so they could
be dealt with together, here.Suggested combined remedy
"hh:mm"becomes"HH:mm"(the original ask): 24-hour, consistent with the adjacentSentDate
field's existing"HH:mm:ss".- Every date and time
ToStringcall inQfcHomeController.Metrics.csand
EfcHomeController.Metrics.csalso passesCultureInfo.InvariantCulture, matching what the six
numeric sites now do. - Update the three affected asserted test literals in
QuickFiler.Test/Controllers/QfcHomeControllerMetricsTests.csand
QuickFiler.Test/Controllers/EfcHomeControllerMetricsTests.cs. - Add a
de-DEculture test asserting the rendered date and time fields, in thetry/finally
culture-restoring form the two existing German-culture tests already use
(BuildQuickFileMetricLines_UnderGermanCulture_RendersInvariantDecimalSeparatorand
WriteMetricsAsync_UnderGermanCulture_RendersInvariantDecimalSeparator). Those tests currently
assert only the decimal separator; extending the assertion to the date and time fields is the
cheapest way to pin all of this at once.
Doing 1 and 2 in one change costs one extra argument per call site and avoids revisiting the same
three files twice.Provenance
Finding CR-3 of
docs/features/active/quickfiler-home-controller-metrics-442/code-review.2026-08-27T14-35.md.
Related follow-ups opened from the same review: #646 (QFC metrics flush writes an empty session
file) and #647 (FileIO2.WriteTextFileAsyncreports success on final failure).- added 6 commits that reference this issue
on Aug 28, 2026 Delivered by #755 (merged 2026-09-03, merge commit 495b012).
Verification on
main(2026-09-06):- All 10 acceptance criteria in
docs/features/active/quickfiler-session-metrics-twelve-hour-time-format-645/spec.mdare checked. - Final feature audit (
evidence/qa-gates/feature-audit.2026-09-03T13-00.md): no blocking findings, ready to merge. QuickFiler/Controllers/QfcHomeController.Metrics.cs:127andQuickFiler/Controllers/EfcHomeController.Metrics.cs:96render the time-of-day field asHH:mm; no live"hh:mm"format string remains.
Closing as completed.
- All 10 acceptance criteria in
Summary
The QuickFiler session-metrics CSV renders its time-of-day field with the .NET format string
"hh:mm". Lowercasehhis the 12-hour clock, and the format carries nottdesignator, so 14:30renders as
02:30and is indistinguishable from 02:30. Every row written since the format wasintroduced carries an ambiguous time.
Three sites are affected, all in QuickFiler:
QuickFiler/Controllers/QfcHomeController.Metrics.cs:31QuickFiler/Controllers/QfcHomeController.Metrics.cs:110QuickFiler/Controllers/EfcHomeController.Metrics.cs:68Line numbers are as of the spec that raised this note; they shift slightly after the metrics work
described below.
Why this was split out rather than fixed alongside the metrics work. This was identified as
cross-feature note CFN-4 while delivering issues #442, #443 and #451 (feature
quickfiler-home-controller-metrics-442). It was deliberately excluded from that scope for threereasons: it is a content defect whereas that feature's remit was the row shape, the flush, and
duration correctness; fixing it breaks three currently passing tests on their asserted literals
(
QuickFiler.Test/Controllers/QfcHomeControllerMetricsTests.cs, two clock-seam tests, andQuickFiler.Test/Controllers/EfcHomeControllerMetricsTests.cs, the formatted-row test), each ofwhich encodes the 12-hour rendering; and no issue in that family lists it as an acceptance
criterion. The sibling numeric-format defect at the same sites was fixed there: the six numeric
format calls now pass
CultureInfo.InvariantCulture. The date and time format calls were leftuntouched precisely so this defect could be tracked separately.
Proposed fix. Change the three format strings from
"hh:mm"to"HH:mm"(24-hour) and updatethe three asserted test literals to match.
"HH:mm"is preferred over"hh:mm tt"because theadjacent
SentDatefield already renders as"HH:mm:ss", so 24-hour is the file's existingconvention and keeps the row internally consistent. Consider passing
CultureInfo.InvariantCultureto these calls at the same time, matching what the numeric fields now do.
Backward compatibility. The session-metrics CSV has no in-repo reader: a repository-wide search
for
EmailSessionreturns three settings-plumbing declarations and three writers, and no parser orschema consumer. The artifact is write-only from the codebase's perspective. The residual risk is
confined to a human-maintained spreadsheet outside the repository.
Environment
msbuild TaskMaster.sln /t:Rebuild /m /p:Configuration=Debug "/p:Platform=Any CPU"Steps to Reproduce
time of day at or after 13:00 local time.
Expected Behavior
The time-of-day field unambiguously identifies the hour, either on a 24-hour clock (
14:30) or on a12-hour clock with an explicit AM/PM designator (
02:30 PM).Actual Behavior
The field renders
02:30for a 14:30 event. No AM/PM designator is present, so an afternoon row isbyte-identical to a small-hours row and the recorded time cannot be recovered from the file.
Logs / Screenshots
"hh:mm"atQuickFiler/Controllers/QfcHomeController.Metrics.cs:31and:110, andQuickFiler/Controllers/EfcHomeController.Metrics.cs:68.Impact / Severity
Medium: the emitted data is silently wrong rather than absent, and the file has no in-repo reader,
so nothing in the product misbehaves. The cost is borne by whoever analyses the CSV outside the
repository.
Source
From: docs/features/potential/2026-08-27-quickfiler-session-metrics-twelve-hour-time-format.md