From 97ad84deb88e3c2872e8f1e24008f2d1e508404b Mon Sep 17 00:00:00 2001 From: Jesse Gumm Date: Thu, 12 Sep 2013 19:34:14 -0500 Subject: [PATCH] Convert from now() to os:timestamp() --- src/qdate.erl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qdate.erl b/src/qdate.erl index 432260d..4661f4c 100644 --- a/src/qdate.erl +++ b/src/qdate.erl @@ -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,