From 1f014230d4a4b0ac45a466dcb4c2875092d63748 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Wed, 17 Jan 2024 19:49:44 +0100 Subject: [PATCH] Fix missing timezone --- api/resolvers/growth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/resolvers/growth.js b/api/resolvers/growth.js index 259ac1c2f..0e8b2eefc 100644 --- a/api/resolvers/growth.js +++ b/api/resolvers/growth.js @@ -35,7 +35,7 @@ export function withClause (range) { export function intervalClause (range, table) { const unit = timeUnitForRange(range) - return `date_trunc('${unit}', "${table}".created_at) >= date_trunc('${unit}', $1) AND date_trunc('${unit}', "${table}".created_at) <= date_trunc('${unit}', $2) ` + return `date_trunc('${unit}', timezone('America/Chicago', "${table}".created_at)) >= date_trunc('${unit}', timezone('America/Chicago', $1)) AND date_trunc('${unit}', timezone('America/Chicago', "${table}".created_at)) <= date_trunc('${unit}', timezone('America/Chicago', $2)) ` } export function viewIntervalClause (range, view) {