Bson.UTC (cbson v0.1.5) View Source

Represent UTC datetime

  • :ms - miliseconds

iex> inspect %Bson.UTC{ms: 1410473634449} "2014-9-11T22:13:54"

Link to this section Summary

Functions

Returns a struct Bson.UTC using a tuple given by :erlang.now/0

Returns a triplet tuple similar to the return value of :erlang.now/0 using a struct Bson.UTC

Link to this section Functions

Returns a struct Bson.UTC using a tuple given by :erlang.now/0

iex> Bson.UTC.from_now({1410, 473634, 449058})
%Bson.UTC{ms: 1410473634449}

Returns a triplet tuple similar to the return value of :erlang.now/0 using a struct Bson.UTC

iex> Bson.UTC.to_now(%Bson.UTC{ms: 1410473634449})
{1410, 473634, 449000}