DATE and TIMESTAMP don't work as expected in NXQL queries


I am having some problems with DATE and TIMESTAMP when using NXQL queries. According to the documentation:

  • TIMESTAMP <timestamp>: a timestamp in ISO format yyyy - MM - dd hh :mm : ss[. sss] (the space separator can be replaced by a T).
  • DATE : a date in ISO format yyyy - MM - dd, converted internally to a timestamp by adding 00:00:00 to it.

Now, let's do an example search:

1) With date: docinf:dateReceived > DATE '2019-08-14' 2) With timestamp: docinf:dateReceived > TIMESTAMP '2019-08-14 00:00:00' Both queries should return the same results, but they don't.

In this test, I only have one document with the following date: 15-08-2019 01:09:09. The problem is that, in my country, we are in GMT+2, so in ElasticSearch I see the following: 2019-08-14T23:09:09.000Z

Anyway, according to nuxeo documentation, DATE '2019-08-14' and TIMESTAMP '2019-08-14 00:00:00' are exactly the same, and timezone shouldn't be a problem, but that's not true. Am I doing something wrong?

Thank you.

0 votes

0 answers