This commit is contained in:
parent
c7bd7238c6
commit
926d2fe6c2
@ -155,7 +155,7 @@ defmodule CanneryWeb.CoreComponents do
|
|||||||
|
|
||||||
@spec cast_datetime(DateTime.t() | nil) :: String.t()
|
@spec cast_datetime(DateTime.t() | nil) :: String.t()
|
||||||
defp cast_datetime(%DateTime{} = datetime) do
|
defp cast_datetime(%DateTime{} = datetime) do
|
||||||
datetime |> DateTime.from_naive!("Etc/UTC") |> DateTime.to_iso8601(:extended)
|
datetime |> DateTime.to_iso8601(:extended)
|
||||||
end
|
end
|
||||||
|
|
||||||
defp cast_datetime(_datetime), do: ""
|
defp cast_datetime(_datetime), do: ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user