Convert from now() to os:timestamp()

This commit is contained in:
Jesse Gumm 2013-09-12 19:34:14 -05:00
parent 868eb1acf6
commit 97ad84deb8

View file

@ -70,7 +70,7 @@ stop() ->
application:stop(qdate).
to_string(Format) ->
to_string(Format, now()).
to_string(Format, os:timestamp()).
to_string(Format, Date) ->
to_string(Format, ?DETERMINE_TZ, Date).
@ -343,7 +343,7 @@ to_unixtime(ToParse) ->
calendar:datetime_to_gregorian_seconds(Date) - ?UNIXTIME_BASE.
unixtime() ->
to_unixtime(now()).
to_unixtime(os:timestamp()).
to_now(Now = {_,_,_}) ->
Now;
@ -371,7 +371,6 @@ deregister_format(Key) ->
qdate_srv:deregister_format(Key).
unixtime_to_now(T) when is_integer(T) ->
MegaSec = floor(T/1000000),
Secs = T - MegaSec*1000000,