Questions: Add timezone to closed property
This commit is contained in:
parent
f13b7878b4
commit
d85bcc8627
2 changed files with 8 additions and 3 deletions
|
|
@ -179,9 +179,9 @@ defmodule Pleroma.Web.CommonAPI.Utils do
|
|||
end)
|
||||
|
||||
end_time =
|
||||
NaiveDateTime.utc_now()
|
||||
|> NaiveDateTime.add(expires_in)
|
||||
|> NaiveDateTime.to_iso8601()
|
||||
DateTime.utc_now()
|
||||
|> DateTime.add(expires_in)
|
||||
|> DateTime.to_iso8601()
|
||||
|
||||
key = if truthy_param?(data["poll"]["multiple"]), do: "anyOf", else: "oneOf"
|
||||
poll = %{"type" => "Question", key => option_notes, "closed" => end_time}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue