Time.to_iso8601
You're seeing just the function
to_iso8601
, go back to Time module for more information.
Specs
to_iso8601(Calendar.time(), :extended | :basic) :: String.t()
Converts the given time to ISO 8601:2019.
By default, Time.to_iso8601/2
returns times formatted in the "extended"
format, for human readability. It also supports the "basic" format through
passing the :basic
option.
Examples
iex> Time.to_iso8601(~T[23:00:13])
"23:00:13"
iex> Time.to_iso8601(~T[23:00:13.001])
"23:00:13.001"
iex> Time.to_iso8601(~T[23:00:13.001], :basic)
"230013.001"
iex> Time.to_iso8601(~N[2010-04-17 23:00:13])
"23:00:13"