fix not finding the current hour visit record

This commit is contained in:
Pouria Ezzati 2024-12-28 12:19:09 +03:30
parent 3a8a546866
commit 2c83f8e2d8

View File

@ -25,7 +25,7 @@ function knexUtils(knex) {
case "pgnative":
case "cockroachdb":
// PostgreSQL has the `date_trunc` function, which is ideal for this task
return knex.raw(`date_trunc(?, ${columnName})`, [precision]);
return knex.raw(`date_trunc(?, ${columnName} at time zone 'Z')`, [precision]);
case "oracle":
case "oracledb":
// Oracle truncates dates using the `TRUNC` function