OpenDJ REST no results when comparing to date

112 views Asked by At

REST wont return no results when comparing date:

/groups@org?_queryFilter=(validFrom+ge+"201508280000")&_prettyPrint=true or

/groups@org?_queryFilter=(validFrom+le+"201508280000")&_prettyPrint=true

result:

{
  "result" : [ ],
  "resultCount" : 0,
  "pagedResultsCookie" : null,
  "remainingPagedResults" : -1
}

the date is in the result when filter is not used:

..,{

    "validTo" : "201506120000+0100",
    "_rev" : "0000000000a3ab4a",
    "schemas" : [ "urn:scim:schemas:core:1.0" ],
    "_id" : "9b682c25-359d-4cf3-b0a6-49401d0f9386",
    "validFrom" : "201506080000+0100"
},..
2

There are 2 answers

4
Ludovic Poitou On

Can you check OpenDJ access logs and whether the filter translated to LDAP makes sense ? I've just tried on my local server and it seems that the date is actually treated as seconds and not UTC.

0
Matej On

I don't know if I figured it out, but the date in the filter must be in format YYYYMMDDhhmmssZ like this 20150101000000Z