From d24b0727ea84a38a3712023123ff697dabbd8177 Mon Sep 17 00:00:00 2001 From: keyan Date: Wed, 1 Feb 2023 18:09:28 -0600 Subject: [PATCH] fix streak length time zone --- api/resolvers/user.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/resolvers/user.js b/api/resolvers/user.js index 941a789b..e7164395 100644 --- a/api/resolvers/user.js +++ b/api/resolvers/user.js @@ -492,7 +492,7 @@ export default { }, streak: async (user, args, { models }) => { const res = await models.$queryRaw` - SELECT (now_utc() at time zone 'America/Chicago')::date - "startedAt" AS days + SELECT (now() at time zone 'America/Chicago')::date - "startedAt" AS days FROM "Streak" WHERE "userId" = ${user.id} AND "endedAt" IS NULL `