fettle v0.1.0 Fettle.TimeStamp View Source

Helper functions for creating and converting timestamps.

Link to this section Summary

Functions

Add increment to instant; for tests

Get a timestamp in monotonic time

Convert an instant to a DateTime

Convert an instant to an ISO-8601 dateTime string

Link to this section Types

Link to this type t() View Source
t() :: {timestamp :: integer, offset :: integer}

Link to this section Functions

Link to this function incr(instant, increment) View Source
incr(instant :: t, increment :: integer) :: t

Add increment to instant; for tests

Get a timestamp in monotonic time

Link to this function to_date_time(instant) View Source
to_date_time(instant :: t) :: DateTime.t

Convert an instant to a DateTime

Link to this function to_string(instant) View Source
to_string(instant :: t) :: String.t

Convert an instant to an ISO-8601 dateTime string