Commit 465adedb authored by Ivan Tashkinov's avatar Ivan Tashkinov
Browse files

[#534] Websub fix: made SQL use UTC time zone when comparing with...

[#534] Websub fix: made SQL use UTC time zone when comparing with `valid_until` (instead of postgresql-server default time zone).
parent 656ed7c8
......@@ -64,7 +64,7 @@ def publish(topic, user, %{data: %{"type" => type}} = activity)
from(
sub in WebsubServerSubscription,
where: sub.topic == ^topic and sub.state == "active",
where: fragment("? > NOW()", sub.valid_until)
where: fragment("? > (NOW() at time zone 'UTC')", sub.valid_until)
)
subscriptions = Repo.all(query)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment