Problem trying to call Ecto.DateTime.to_iso8601

That works perfectly. Awesome tip, removes an extra step converting and discarding the :ok in the tuple that comes back from cast/1.