Use datetime with TZ for posts timestamps

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2020-10-13 20:42:15 +02:00
parent 93cecbe49c
commit 86e1e84247
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
2 changed files with 3 additions and 3 deletions

View File

@ -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,

View File

@ -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 [