Skip to content
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

Use CurrentCulture for datetime parsing #22683

Merged
merged 2 commits into from
Jul 16, 2021

Conversation

christothes
Copy link
Member

fixes #22638

@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
@@ -253,7 +253,7 @@ private static AccessToken DeserializeOutput(string output)
break;

case "ExpiresOn":
expiresOn = DateTimeOffset.Parse(e.Value, CultureInfo.InvariantCulture).ToUniversalTime();
expiresOn = DateTimeOffset.Parse(e.Value, CultureInfo.CurrentCulture).ToUniversalTime();
Copy link
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
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