Azure / Azure/azure-powershell

Use Invariant Culture to Serialize the DateTime in Query String

Open Beginner friendly
#26,365 2 comments 0 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad bug CosmosDB Service Attention
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.