php-kit icon indicating copy to clipboard operation
php-kit copied to clipboard

dateBefore predicate issue

Open levimykel opened this issue 8 years ago • 0 comments

The dateBefore predicate sometimes gives incorrect results.

In my case I have a timestamp field with the following data: screen shot 2017-06-01 at 16 24 05

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.

levimykel avatar Jun 01 '17 14:06 levimykel