fix streak length time zone
This commit is contained in:
parent
072e60c954
commit
d24b0727ea
|
@ -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
|
||||
`
|
||||
|
|
Loading…
Reference in New Issue