Skip to content

Conversation

@nmiguezg
Copy link

@nmiguezg nmiguezg commented Jan 30, 2025

When the client library reads a query payload in Atom format containing values of type EdmDateTime or EdmDateTimeOffset with a precision greater than milliseconds, it throws an EdmSimpleTimeException, causing the entire query to fail.

According to the OData 2.0 standard specification (OData 2.0 Overview, section 6. Primitive Data Types), literals of type EdmDateTime and EdmDateTimeOffset support up to seven decimal places of precision:

datetime'yyyy-mm-ddThh:mm[:ss[.fffffff]]' NOTE: Spaces are not allowed between datetime and quoted portion. datetime is case-insensitive

datetimeoffset'' dateTimeOffsetLiteral = Defined by the lexical representation for datetime (including timezone offset) at https://www.w3.org/TR/xmlschema-2

So, here it is fixed by changing both date types default type from java.util.Calendar to java.sql.Timestamp (as it's also the default type in the olingo-odata4 library).

@nmiguezg nmiguezg force-pushed the fork branch 3 times, most recently from 065b18c to 8699c8a Compare February 3, 2025 08:47
…DateTimeOffset values with precision greater than milliseconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant