fix streak length time zone

This commit is contained in:
keyan 2023-02-01 18:09:28 -06:00
parent 072e60c954
commit d24b0727ea
1 changed files with 1 additions and 1 deletions

View File

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