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

Date/Time serialization uses current culture #280

Closed
filipnavara opened this issue Jun 1, 2024 · 6 comments · Fixed by #298
Closed

Date/Time serialization uses current culture #280

filipnavara opened this issue Jun 1, 2024 · 6 comments · Fixed by #298
Labels
area:serialization Focused on functional modules of the product enhancement New feature or request help wanted Standard GitHub label

Comments

@filipnavara
Copy link

There are multiple calls to DateTime.TryParse, DateTimeOffset.TryParse and the respective ToString counterparts without a specified culture parameter. This implies a current culture is used instead of CultureInfo.InvariantCulture which would be an obvious choice for data interchange format.

Notably, the culture can use a non-Gregorian calendar, such as Persian one, which will likely result in incorrectly parsed/serialized data.

@andrueastman
Copy link
Member

Thanks for raising this @filipnavara

Any chance you'd be willing to submit a PR to resolve this?

@andrueastman andrueastman added the status:waiting-for-author-feedback Issue that we've responded but needs author feedback to close label Jun 3, 2024
@filipnavara
Copy link
Author

Any chance you'd be willing to submit a PR to resolve this?

Not planning to do so any time soon. I still have other pressing issues on my backlog.

@andrueastman
Copy link
Member

Transferring issue as part of #238

@andrueastman andrueastman transferred this issue from microsoft/kiota-serialization-json-dotnet Jul 9, 2024
@andrueastman andrueastman added area:serialization Focused on functional modules of the product help wanted Standard GitHub label enhancement New feature or request labels Jul 9, 2024
@MartinM85
Copy link
Contributor

MartinM85 commented Jul 16, 2024

@andrueastman Can I take it? The issue with current culture is also for numbers. So I can fix datetime and numbers and prepare some unit tests. Once you decide how to resolve #283, it can be implemented in this ticket.

@baywet
Copy link
Member

baywet commented Jul 16, 2024

As a general rule of thumb, if issues are not assigned to anyone, nobody from our team is working on them (as in writing code to fix it, we might still be talking about it, etc...). We'll be more than happy to see a PR coming to address that.

@andrueastman
Copy link
Member

Please go ahead. @MartinM85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:serialization Focused on functional modules of the product enhancement New feature or request help wanted Standard GitHub label
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants