WebApi
WebApi copied to clipboard
Support now()
Per oData v4 spec,
5.1.1.4.21 now The now function has the following signature: Edm.DateTimeOffset now() The now function returns the current point in time (date and time with time zone) as a DateTimeOffset value.
This doesn't seem to be supported in version 5.6 of oData.
Example: http://Example.com/ProductPrices?$count=true&$filter=SKU+eq+%274F3-00015%27+and+FutureEndDate+gt+now()
Result:
{
error: {
code: "",
message: "The query specified in the URI is not valid. Unknown function 'now'."
}
}
Now() is not supported for now. Either use a service local now(), or find a Linq that EF can translate it into a SQL now.
See #872