php-kit
php-kit copied to clipboard
dateBefore predicate 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.