diff --git a/lib/graphql/schema/post.ex b/lib/graphql/schema/post.ex index 5057d08b4..a273dd837 100644 --- a/lib/graphql/schema/post.ex +++ b/lib/graphql/schema/post.ex @@ -17,8 +17,8 @@ defmodule Mobilizon.GraphQL.Schema.PostType do field(:attributed_to, :actor, description: "The post's group") field(:visibility, :post_visibility, description: "The post's visibility") field(:publish_at, :datetime, description: "When the post was published") - field(:inserted_at, :naive_datetime, description: "The post's creation date") - field(:updated_at, :naive_datetime, description: "The post's last update date") + field(:inserted_at, :datetime, description: "The post's creation date") + field(:updated_at, :datetime, description: "The post's last update date") field(:tags, list_of(:tag), resolve: &Tag.list_tags_for_post/3, diff --git a/lib/mobilizon/posts/post.ex b/lib/mobilizon/posts/post.ex index 93439b568..cbd095f66 100644 --- a/lib/mobilizon/posts/post.ex +++ b/lib/mobilizon/posts/post.ex @@ -61,7 +61,7 @@ defmodule Mobilizon.Posts.Post do belongs_to(:picture, Picture, on_replace: :update) many_to_many(:tags, Tag, join_through: "posts_tags", on_replace: :delete) - timestamps() + timestamps(type: :utc_datetime) end @required_attrs [