소스 검색

fix not finding the current hour visit record

Pouria Ezzati 1 년 전
부모
커밋
2c83f8e2d8
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      server/utils/knex.js

+ 1 - 1
server/utils/knex.js

@@ -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