In my case I have a timestamp field with the following data:
When I do a query using the following predicate
Predicates::dateBefore( {path}, new DateTime('2017-01-03'))
it does not return the document above, which I would expect it to.
The following will return the document correctly:
Predicates::dateBefore( {path}, '2017-01-03')
Therefore, I suspect that the conversion to a Timestamp needs to be fixed to account for time zones.
I'm also assuming that this needs to be done as well for the dateAfter and dateBetween predicates.
Since there has been no activity since 2017 I will proceed to close this Issue! If anybody runs into this problem again, please re-open or start a new issue.
The
dateBefore
predicate sometimes gives incorrect results.In my case I have a timestamp field with the following data:
When I do a query using the following predicate
Predicates::dateBefore( {path}, new DateTime('2017-01-03'))
it does not return the document above, which I would expect it to.The following will return the document correctly:
Predicates::dateBefore( {path}, '2017-01-03')
Therefore, I suspect that the conversion to a Timestamp needs to be fixed to account for time zones.
I'm also assuming that this needs to be done as well for the dateAfter and dateBetween predicates.