From: Ivan Tashkinov Date: Fri, 25 Jan 2019 15:29:43 +0000 (+0300) Subject: [#534] Websub fix: made SQL use UTC time zone when comparing with `valid_until` ... X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=465adedb7cc457303278444d0f56960f87fde1e9;p=akkoma [#534] Websub fix: made SQL use UTC time zone when comparing with `valid_until` (instead of postgresql-server default time zone). --- diff --git a/lib/pleroma/web/websub/websub.ex b/lib/pleroma/web/websub/websub.ex index bb4442591..cbb7a5ac7 100644 --- a/lib/pleroma/web/websub/websub.ex +++ b/lib/pleroma/web/websub/websub.ex @@ -64,7 +64,7 @@ defmodule Pleroma.Web.Websub do 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)