diff --git a/lib/philomena/badges/award.ex b/lib/philomena/badges/award.ex index a71bce2f..9b0a8a36 100644 --- a/lib/philomena/badges/award.ex +++ b/lib/philomena/badges/award.ex @@ -11,7 +11,7 @@ defmodule Philomena.Badges.Award do belongs_to :badge, Badge field :label, :string - field :awarded_on, :naive_datetime + field :awarded_on, :utc_datetime field :reason, :string field :badge_name, :string diff --git a/lib/philomena_web/views/profile_view.ex b/lib/philomena_web/views/profile_view.ex index 5344e755..d4888032 100644 --- a/lib/philomena_web/views/profile_view.ex +++ b/lib/philomena_web/views/profile_view.ex @@ -2,7 +2,7 @@ defmodule PhilomenaWeb.ProfileView do use PhilomenaWeb, :view def award_order(awards) do - Enum.sort_by(awards, &{!&1.badge.priority, &1.created_at}) + Enum.sort_by(awards, &{!&1.badge.priority, &1.awarded_on}) end def badge_image(badge, options \\ []) do