allanbatista
1/18/2018 - 6:33 PM

Create a elixir datetime with timezone

Create a elixir datetime with timezone

defmodule DateTimeHelper do
  def get_datetimezone_iso8601 do
    Timex.now
    |> Timex.format!("{ISO:Extended:Z}")
  end
end

iex> DateTimeHelper.get_datetimezone_iso8601()
#=> "2018-01-18T15:31:05.153423Z"