Skip to content

Use CurrentCulture for datetime parsing#22683

Merged
christothes merged 2 commits intoAzure:mainfrom
christothes:PowershellCredCulture
Jul 16, 2021
Merged

Use CurrentCulture for datetime parsing#22683
christothes merged 2 commits intoAzure:mainfrom
christothes:PowershellCredCulture

Conversation

@christothes
Copy link
Copy Markdown
Member

fixes #22638

@christothes christothes requested a review from schaabs as a code owner July 16, 2021 00:12
@ghost ghost added the Azure.Identity label Jul 16, 2021
@christothes christothes self-assigned this Jul 16, 2021
@christothes christothes requested a review from jsquire July 16, 2021 00:12

case "ExpiresOn":
expiresOn = DateTimeOffset.Parse(e.Value, CultureInfo.InvariantCulture).ToUniversalTime();
expiresOn = DateTimeOffset.Parse(e.Value, CultureInfo.CurrentCulture).ToUniversalTime();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we maybe include a test using the case from the linked bug?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

added

@christothes christothes enabled auto-merge (squash) July 16, 2021 16:48
@christothes christothes merged commit f17da62 into Azure:main Jul 16, 2021
@christothes christothes deleted the PowershellCredCulture branch October 27, 2021 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants