bson v0.4.4 Bson.UTC

Represent UTC datetime

  • :ms - miliseconds

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

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

Functions

from_now(arg)

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}

to_now(u_t_c)

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}