Repository navigation
Bug: quickfiler-session-metrics-twelve-hour-time-format #645
Description
- Work Mode: full-bug
Summary
The QuickFiler session-metrics CSV renders its time-of-day field with the .NET format string
"hh:mm". Lowercase hh is the 12-hour clock, and the format carries no tt designator, so 14:30
renders as 02:30 and is indistinguishable from 02:30. Every row written since the format was
introduced 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:68
Line 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 three
reasons: 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, and
QuickFiler.Test/Controllers/EfcHomeControllerMetricsTests.cs, the formatted-row test), each of
which 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 left
untouched precisely so this defect could be tracked separately.
Proposed fix. Change the three format strings from "hh:mm" to "HH:mm" (24-hour) and update
the three asserted test literals to match. "HH:mm" is preferred over "hh:mm tt" because the
adjacent SentDate field already renders as "HH:mm:ss", so 24-hour is the file's existing
convention and keeps the row internally consistent. Consider passing CultureInfo.InvariantCulture
to 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 EmailSession returns three settings-plumbing declarations and three writers, and no parser or
schema 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
- OS/version: Windows 11, Outlook VSTO add-in host
- Python version: not applicable (C# / .NET Framework 4.8)
- Command/flags used:
msbuild TaskMaster.sln /t:Rebuild /m /p:Configuration=Debug "/p:Platform=Any CPU" - Data source or fixture: the session-metrics CSV emitted by the QuickFiler and EFC metrics writers
Steps to Reproduce
- Run a QuickFiler filing session, or an EFC move session, whose metrics write occurs at any
time of day at or after 13:00 local time. - Open the session-metrics CSV that the run appends to.
- Read the time-of-day field of the appended row.
Expected Behavior
The time-of-day field unambiguously identifies the hour, either on a 24-hour clock (14:30) or on a
12-hour clock with an explicit AM/PM designator (02:30 PM).
Actual Behavior
The field renders 02:30 for a 14:30 event. No AM/PM designator is present, so an afternoon row is
byte-identical to a small-hours row and the recorded time cannot be recovered from the file.
Logs / Screenshots
- Attached minimal logs or snippet
- Snippet: the three offending format strings are the literal
"hh:mm"at
QuickFiler/Controllers/QfcHomeController.Metrics.cs:31and:110, and
QuickFiler/Controllers/EfcHomeController.Metrics.cs:68.
Impact / Severity
- Blocker
- High
- Medium
- Low
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
Activity
drmoisan commentedon Aug 27, 2026
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 ofquickfiler-home-controller-metrics-442(finding CR-3) identified a second, adjacent defect at thesame 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 dateseparator placeholder and
:is the time separator placeholder, and both resolve againstCultureInfo.CurrentCulture. None of the date/time format calls in the two metrics files passesCultureInfo.InvariantCulture, so under a locale such asde-DE:SentDate.ToString("MM/dd/yyyy")renders06.30.2026, not06/30/2026:likewise becomes the locale's time separatorAffected 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-121Why 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 changes
2.00to2,00and therefore changes the CSVfield 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 passCultureInfo.InvariantCulture; the date and time calls were left untouched precisely so they couldbe dealt with together, here.
Suggested combined remedy
"hh:mm"becomes"HH:mm"(the original ask): 24-hour, consistent with the adjacentSentDatefield's existing
"HH:mm:ss".ToStringcall inQfcHomeController.Metrics.csandEfcHomeController.Metrics.csalso passesCultureInfo.InvariantCulture, matching what the sixnumeric sites now do.
QuickFiler.Test/Controllers/QfcHomeControllerMetricsTests.csandQuickFiler.Test/Controllers/EfcHomeControllerMetricsTests.cs.de-DEculture test asserting the rendered date and time fields, in thetry/finallyculture-restoring form the two existing German-culture tests already use
(
BuildQuickFileMetricLines_UnderGermanCulture_RendersInvariantDecimalSeparatorandWriteMetricsAsync_UnderGermanCulture_RendersInvariantDecimalSeparator). Those tests currentlyassert 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).chore(agent-memory): record epic run lessons and potential-entry rece…
docs(707): unbacktick exclusion paths and add spec.md Write Set
fix(645): render QuickFiler/EFC session-metrics time-of-day as 24-hou…
fix(evidence): redact absolute worktree host path from Cobertura cove…
fix(evidence): redact absolute worktree host path from two baseline e…
Merge pull request #755 from drmoisan/bug/quickfiler-session-metrics-…
drmoisan commentedon Sep 6, 2026
Delivered by #755 (merged 2026-09-03, merge commit 495b012).
Verification on
main(2026-09-06):docs/features/active/quickfiler-session-metrics-twelve-hour-time-format-645/spec.mdare checked.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.