microsoft / kiota-serialization-json-dotnet

Kiota serialization provider implementation with System.Text.Json
https://aka.ms/kiota/docs
MIT License
22 stars 26 forks source link

Date/Time serialization uses current culture #236

Open filipnavara opened 1 month ago

filipnavara commented 1 month ago

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 commented 1 month ago

Thanks for raising this @filipnavara

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

filipnavara commented 3 weeks ago

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.