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

Fixed underflow on DateTime parsing #7446

Merged
merged 5 commits into from
Sep 20, 2024

Conversation

sunghwan2789
Copy link
Contributor

Given system that time zone is configured to -01:00, HotChocolate and StrawberryShake are parsing "0001-01-01T00:00:00.000Z" to "0001-01-02T00:00:00.000+00:00".

This pr fixes default(DateTime) is parsed to non-default value

@glen-84
Copy link
Collaborator

glen-84 commented Sep 16, 2024

I don't know why the special handling of Z exists. @michaelstaib, do you remember?

If not, I think that we can also remove it from the DateTimeSerializer class.

@michaelstaib
Copy link
Member

michaelstaib commented Sep 18, 2024

@glen-84 simply check if tests break when you remove it :)

@glen-84
Copy link
Collaborator

glen-84 commented Sep 19, 2024

@sunghwan2789

Would you like to apply a similar change to DateTimeSerializer#TryDeserializeFromString? (i.e. remove the special handling of Z, and just use DateTimeOffset.TryParse)

@michaelstaib michaelstaib merged commit 0007f3f into ChilliCream:main Sep 20, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants