Azure / Azure/azure-powershell
Use Invariant Culture to Serialize the DateTime in Query String
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 51
Description
### Description of the new feature
We recently find the [output of DateTime.ToString() is different in MacOs 14 from other platforms](https://github.com/dotnet/runtime/issues/108742) which causes the CosmosDB test case to fail
Please use invariant culture when to call ToString()
### Proposed implementation details (optional)
```pwsh
utcRestoreDateTime.ToString(CultureInfo.InvariantCulture)
````
Contributor guide
Research direction
Search the repository for utcRestoreDateTime and the DateTime ToString call used to build the query string. Start by tracing the CosmosDB test case that currently fails across platforms, then verify that serialization is stable under different cultures and the test passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100