Skip to content

Ignore case on FormatDateTime_WithMilliseconds_NewZealandCulture #9316

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2025

Conversation

adamint
Copy link
Member

@adamint adamint commented May 14, 2025

Description

macOS uses uppercase for AM/PM in this culture.

Fixes #9151

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@Copilot Copilot AI review requested due to automatic review settings May 14, 2025 19:55
@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 May 14, 2025
Copy link
Contributor

@Copilot 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 updates the FormatDateTime test for New Zealand culture to handle macOS’s use of uppercase AM/PM by adding case-insensitive comparison.

  • Updated the Assert.Equal call to include ignoreCase:true.
  • Removed an ActiveIssue attribute that is no longer needed due to the improved date format handling.

@JamesNK
Copy link
Member

JamesNK commented May 14, 2025

Why does MacOS use uppercase? NZ culture is to lower case the am/pm.
Why has it failed just now?

@adamint
Copy link
Member Author

adamint commented May 14, 2025

Why does MacOS use uppercase? NZ culture is to lower case the am/pm.

Great question. No clue. However, to verify this on a mac terminal:
image
https://man7.org/linux/man-pages/man3/strftime.3.html (docs on %p)

Why has it failed just now?

I don't see a failure?

@JamesNK
Copy link
Member

JamesNK commented May 14, 2025

Ok. I don't think it's important enough to research closely. Most likely there is something weird about MacOS culture settings.

@danmoseley
Copy link
Member

It wasn't previously run on Mac most likely. @radical just added Mac coverage

Copy link
Member

@danmoseley danmoseley left a comment

Choose a reason for hiding this comment

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

Hack but fine

@danmoseley danmoseley added area-dashboard and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels May 15, 2025
@danmoseley danmoseley merged commit 15212ad into dotnet:main May 15, 2025
255 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 14, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failing on macOS: FormatDateTime_WithMilliseconds_NewZealandCulture
3 participants