Use :utc_datetime

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2022-07-16 16:09:47 +02:00
commit 597f56b4c4
4 changed files with 6 additions and 6 deletions

View file

@ -1463,8 +1463,8 @@ defmodule Pleroma.User do
expires_at =
if expires_in > 0 do
NaiveDateTime.utc_now()
|> NaiveDateTime.add(expires_in)
DateTime.utc_now()
|> DateTime.add(expires_in)
else
nil
end

View file

@ -18,7 +18,7 @@ defmodule Pleroma.UserRelationship do
belongs_to(:source, User, type: FlakeId.Ecto.CompatType)
belongs_to(:target, User, type: FlakeId.Ecto.CompatType)
field(:relationship_type, Pleroma.UserRelationship.Type)
field(:expires_at, :naive_datetime)
field(:expires_at, :utc_datetime)
timestamps(updated_at: false)
end