Skip to content

Commit

Permalink
fix timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
minghinmatthewlam committed Nov 2, 2024
1 parent ba62135 commit 3b2d129
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/src/adapters/postgres.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,14 @@ export class PostgresDatabaseAdapter extends DatabaseAdapter {

if (params.start) {
paramCount++;
sql += ` AND "createdAt" >= to_timestamp($${paramCount / 1000})`;
values.push(params.start);
sql += ` AND "createdAt" >= to_timestamp($${paramCount})`;
values.push(params.start/1000);
}

if (params.end) {
paramCount++;
sql += ` AND "createdAt" <= to_timestamp($${paramCount / 1000})`;
values.push(params.end);
sql += ` AND "createdAt" <= to_timestamp($${paramCount})`;
values.push(params.end/1000);
}

if (params.unique) {
Expand Down

0 comments on commit 3b2d129

Please sign in to comment.