Skip to content

Conversation

@tarekgh
Copy link
Member

@tarekgh tarekgh commented Oct 7, 2025

Fixes #120468

Copilot AI review requested due to automatic review settings October 7, 2025 23:35
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Oct 7, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in DateTime fraction specifier parsing where the ".F" format pattern was not being handled correctly when the decimal point was missing from the input string. The fix removes incorrect nested braces that were preventing proper execution of the optional fraction handling logic.

  • Corrects brace placement in DateTimeParse.cs to allow proper execution of optional fraction logic
  • Adds comprehensive test coverage for .F, .FF, and .FFF format specifiers

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/libraries/System.Private.CoreLib/src/System/Globalization/DateTimeParse.cs Fixes incorrect brace placement that was preventing optional fraction specifier logic from executing
src/libraries/System.Runtime/tests/System.Runtime.Tests/System/DateTimeTests.cs Adds test cases to verify .F format specifier parsing works correctly

@tarekgh tarekgh added area-System.DateTime and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Oct 7, 2025
@tarekgh tarekgh added this to the 11.0.0 milestone Oct 7, 2025
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-datetime
See info in area-owners.md if you want to be subscribed.

@tarekgh tarekgh merged commit bca43fc into dotnet:main Oct 8, 2025
142 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug in DateTime format handling for ".F", optional fractional seconds.

4 participants