From 465adedb7cc457303278444d0f56960f87fde1e9 Mon Sep 17 00:00:00 2001 From: Ivan Tashkinov Date: Fri, 25 Jan 2019 18:29:43 +0300 Subject: [PATCH] [#534] Websub fix: made SQL use UTC time zone when comparing with `valid_until` (instead of postgresql-server default time zone). --- lib/pleroma/web/websub/websub.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.45.2