@Manulak
I’m not looking at this from an IFS mind set. I’m looking at this strictly from an OData documentation perspective. Yes it does fail and so it should as this is what the OData specification defines.
Look at it this way:
If the OData endpoint defines a String attribute with a MaxLength=200 and you send a String with 205 characters you would not expect IFS to cut off the last 5 characters just because “String is a primitive data type of OData” either. Why would you expect this for DateTimeOffset?
The OData specification defines Datatypes (like String and DateTimeOffset) but then also describes Facets which put further restrictions on top of these base types. For String there is the “MaxLength” Facet which limits the maximum length and for DateTimeOffset there is the “Precision” Facet which limits the maximum precision of fractional seconds.
You are simply using the DateTimeOffset type with too much precision in C# and that is not a fault within the IFS REST APIs but with the values you provide.
If you replace
DateTimeOffset.Now
with something like the following (which removes milli, micro and nano seconds from the DateTimeOffSet)
new DateTimeOffset(DateTimeOffset.Now.Ticks/10000000*10000000, DateTimeOffset.Now.Offset);
it will work.
There is nothing for IFS to solve as IFS strictly follows the OData specification.