Calendar.ISO.parse_utc_datetime

You're seeing just the function parse_utc_datetime, go back to Calendar.ISO module for more information.
Link to this function

parse_utc_datetime(string)

View Source (since 1.10.0)

Parses a UTC datetime string in the :extended format.

For more information on supported strings, see how this module implements ISO 8601.

Examples

iex> Calendar.ISO.parse_utc_datetime("2015-01-23 23:50:07Z")
{:ok, {2015, 1, 23, 23, 50, 7, {0, 0}}, 0}

iex> Calendar.ISO.parse_utc_datetime("2015-01-23 23:50:07+02:30")
{:ok, {2015, 1, 23, 21, 20, 7, {0, 0}}, 9000}

iex> Calendar.ISO.parse_utc_datetime("2015-01-23 23:50:07")
{:error, :missing_offset}
Link to this function

parse_utc_datetime(string, format)

View Source (since 1.12.0)

Parses a UTC datetime string according to a given format.

The format can either be :basic or :extended.

For more information on supported strings, see how this module implements ISO 8601.

Examples

iex> Calendar.ISO.parse_utc_datetime("20150123 235007Z", :basic)
{:ok, {2015, 1, 23, 23, 50, 7, {0, 0}}, 0}
iex> Calendar.ISO.parse_utc_datetime("20150123 235007Z", :extended)
{:error, :invalid_format}