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

Fix issue with parsing date with hardcoded format #49

Merged
merged 1 commit into from
Oct 5, 2022

Conversation

snowfrogdev
Copy link
Contributor

We are creating a DateTimeOffset on the server and sending it in string format to the client. There, using ParseExact and a hardcoded US date format, we are converting it back to a DateTimeOffset.

The problem is that when the date is created on a server that is in a non-US locale, the client throws and error and the app crashes.

We are creating a DateTimeOffset on the server and sending it in string format to the client. There, using ParseExact and a hardcoded US date format, we are converting it back to a DateTimeOffset.

The problem is that when the date is created on a server that is in a non-US locale, the client throws and error and the app crashes.
@ardalis
Copy link
Owner

ardalis commented Oct 5, 2022

Thanks!

@ardalis ardalis merged commit 3c5100e into ardalis:main Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants