Commandex.Type.UTCDateTime (Commandex v0.6.0)

Copy Markdown View Source

Casts values to datetimes in UTC.

Accepts a DateTime, a NaiveDateTime, or an ISO 8601 string. A value with an offset or a time zone is moved to UTC. A value without an offset is taken as UTC.

This module keeps the microseconds as given. The :utc_datetime type drops them and the :utc_datetime_usec type sets their precision to 6 digits.

Summary

Types

t()

@type t() :: DateTime.t()