summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormarcin mikołajczak <git@mkljczk.pl>2022-07-16 16:09:47 +0200
committermarcin mikołajczak <git@mkljczk.pl>2022-07-16 16:28:22 +0200
commit597f56b4c4db3c63ff66fc93717d3b20655e1543 (patch)
treea00d47fcac36d9793bd43b294007888ae1b6b70e /lib
parent0b16ce79f91c0f7c99cf11567e29b1adb139ff35 (diff)
downloadpleroma-597f56b4c4db3c63ff66fc93717d3b20655e1543.tar.gz
pleroma-597f56b4c4db3c63ff66fc93717d3b20655e1543.zip
Use :utc_datetime
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/user.ex4
-rw-r--r--lib/pleroma/user_relationship.ex2
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex
index 88837b91a..44754879a 100644
--- a/lib/pleroma/user.ex
+++ b/lib/pleroma/user.ex
@@ -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
diff --git a/lib/pleroma/user_relationship.ex b/lib/pleroma/user_relationship.ex
index f35f3ac63..5b3e593d3 100644
--- a/lib/pleroma/user_relationship.ex
+++ b/lib/pleroma/user_relationship.ex
@@ -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