You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Parse GitHub timestamps with the invariant culture in GitHubClient #723
GitHubClient parses ISO-8601 timestamps with the current culture and no RoundtripKind, unlike its three sibling clients. On a machine whose culture is not invariant, issue and pull-request timestamps can parse differently or fail, and the value silently becomes null. Found in the 2026-09-27 repository review.
Context
src/Infrastructure/Backlog.Infrastructure.GitHub/GitHubClient.cs line 400:
The three other copies of the same helper pass CultureInfo.InvariantCulture, DateTimeStyles.RoundtripKind:
src/Infrastructure/Backlog.Infrastructure.GitHub/CopilotUsageClient.cs line 259
src/Infrastructure/Backlog.Infrastructure.GitHub/GitHubActivityClient.cs line 1055
src/Infrastructure/Backlog.Infrastructure.Claude/ClaudeUsageClient.cs line 393
Fix the parse in GitHubClient.cs to match. While there, collapse the four Timestamp(JsonElement, string) helpers (and the three identical Rfc3339 helpers at GitHubActivityBaselineClient.cs line 166, GitHubActivityClient.cs line 1037 and ClaudeUsageClient.cs line 366) into one internal helper so the next copy cannot drift. Add a test in tests/Backlog.Infrastructure.GitHub.UnitTests that runs the parse under a culture such as de-DE and asserts the same instant comes back.
Activity
JSdotNet commentedon Sep 28, 2026
The issue sweep opened a draft pull request for this issue: #794. Read its What could not be proved section before marking it ready.