Converting Filter, to ECQL, to Filter not working for Before and After

Description

I am using GeoTools 19.1

I am using the ECQL class to convert an OGC Filter to a CQL string. My OGC Filter looks like

[ testAttribute After Instant{position:Position{Wed Oct 09 14:49:51 MST 2019}} ]

and when I call `ECQL.toCql(...)` on it. It gives me the following


testAttribute AFTER 'Instant{position:Position{Wed Oct 09 14:49:51 MST 2019}}'


To ensure I can get back to the original Filter from the CQL, I try calling the following in a test
`ECQL.toFilter(...)` but I get the following exception

 

It appears to be an issue with the escaping of the Instant. Also I believe the Instant in the OGC Filter should be represented as an ISO formatted date in CQL.

 

Does need to do an literal instanceof Instant, like it does for date? And appropriately translate it?

Environment

None

Status

Assignee

Unassigned

Reporter

Peter Huffer

Triage

None

Priority

High
Configure