Return iso8601 date.
[akkoma] / lib / pleroma / web / mastodon_api / mastodon_api_controller.ex
index 69b559a09a4f59d3d09726d616d5a863865b3d2e..dede0434db5d383c905b5ac746426d0978e932fd 100644 (file)
@@ -157,6 +157,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
     notifications = Notification.for_user(user, params)
     result = Enum.map(notifications, fn (%{id: id, activity: activity, inserted_at: created_at}) ->
       actor = User.get_cached_by_ap_id(activity.data["actor"])
+      created_at = NaiveDateTime.to_iso8601(created_at)
       case activity.data["type"] do
         "Create" ->
           %{id: id, type: "mention", created_at: created_at, account: AccountView.render("account.json", %{user: actor}), status: StatusView.render("status.json", %{activity: activity})}