Skip to content

Commit

Permalink
Fix timezone offset in notifications (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaBernstein authored Jun 8, 2022
1 parent 3db67ec commit ce20781
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/crud/auth_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (r *Repo) GetUsersToNotify() (*sql.Rows, error) {
userset."setting" = 'user.tzOffset' AND
tx.archived = FALSE AND
MOD(s."notificationHour" + 24 + CASE WHEN userset."value" IS NULL THEN 0 ELSE userset."value"::DECIMAL END, 24) = $1 AND
MOD(s."notificationHour" + 24 - CASE WHEN userset."value" IS NULL THEN 0 ELSE userset."value"::DECIMAL END, 24) = $1 AND
tx.created + INTERVAL '1 hour' * s."delayHours" <= NOW()
GROUP BY u."tgChatId"
) AS overdue,
Expand Down

0 comments on commit ce20781

Please sign in to comment.