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,