Skip to content

A .NET/C# OData client using `DateTimeOffset.Now` for a datetime field throws ODP_DESERIALIZATION_ERROR against an IFS OData endpoint, even though the field itself accepts DateTimeOffset values fine otherwise — is this an IFS bug?

Answer

This is expected OData-specification behavior, not an IFS defect. OData's DateTimeOffset type carries a Precision facet limiting how many fractional-second digits are accepted — the same way a String attribute enforces a MaxLength facet — and DateTimeOffset.Now in .NET carries far more sub-second precision (ticks) than that facet allows, causing deserialization to reject it. Strip the excess precision before sending — for example, truncating to whole-second resolution — and the same value will deserialize successfully; this is a client-side formatting fix rather than something IFS needs to patch.

← Browse Integrations and APIs questions