Replies: 2 comments
-
|
A colleague found a few things on this page https://learn.microsoft.com/de-de/odata/odatalib/release-notes/odatalib-8
Unfortunately this also didn't seem to have an impact. I also create my own factory, but it never got called. |
Beta Was this translation helpful? Give feedback.
-
|
We found a work-around, instead of using |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We've got a simple model with a property
LogDtdefined asSystem.DateTimeOffset.When we fetch something, the odata server returns the date like this:
"2021-06-16T12:12:12Z". This is a behaviour which we cannot change, it's a third party product.When setting the date in C# (we tried
DateTimeOffset.UtcNow,DateTimeOffset.Now,DateTime.Nowand more) and then try to submit the PATCH request, the server receives either2024-11-27T07:54:55.0481881Zor2024-11-27T08:53:53.8399277+01:00.Our 3rd party odata server does not seem to like milli-, micro- and nanoseconds.
How can we change the date format in the JSON request when building a request?
ODataPayloadValueConverterwithservices.AddSingleton(typeof(ODataPayloadValueConverter), pvc => new DateTimeValueLocaliser());, but this never gets calledBeta Was this translation helpful? Give feedback.
All reactions