ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,682 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi,
How to disable or prevent automatic datetime conversion when JArray.parse?
JArray ja = JArray.parse(fromString); --> I didn't find the option in JsonLoadSettings for disabling the automatic datetime conversion.
when running in Postman, it show correctly like below:
[
{
"startDate": "2022-10-03T22:03:15+00:00",
"endDate": "2022-10-03T22:03:15+00:00"
}
]
but when running in my C# code, it converted to UTC+0
see newton soft timezone settings:
https://www.newtonsoft.com/json/help/html/SerializeDateTimeZoneHandling.htm