1
0
Fork 0
mirror of https://github.com/processone/ejabberd synced 2025-10-05 10:39:29 +02:00

Replace code using p1_time_compat wrapper with native functions

Since we now require R19, we shouldn't need that anymore.

There are still couple places where p1_time_compat:unique_timestamp() is
used as there is no direct equivalent.
This commit is contained in:
Paweł Chmielowski 2019-02-27 09:56:20 +01:00
parent 77ac0584ed
commit 538f35d05a
44 changed files with 80 additions and 80 deletions

View file

@ -858,7 +858,7 @@ delete_old_users_vhost(Host, Days) ->
delete_old_users(Days, Users) ->
SecOlder = Days*24*60*60,
TimeStamp_now = p1_time_compat:system_time(seconds),
TimeStamp_now = erlang:system_time(second),
TimeStamp_oldest = TimeStamp_now - SecOlder,
F = fun({LUser, LServer}) ->
case catch delete_or_not(LUser, LServer, TimeStamp_oldest) of
@ -1360,12 +1360,12 @@ get_last(User, Server) ->
[] ->
case mod_last:get_last_info(User, Server) of
not_found ->
{p1_time_compat:timestamp(), "NOT FOUND"};
{erlang:timestamp(), "NOT FOUND"};
{ok, Shift, Status1} ->
{{Shift div 1000000, Shift rem 1000000, 0}, Status1}
end;
_ ->
{p1_time_compat:timestamp(), "ONLINE"}
{erlang:timestamp(), "ONLINE"}
end,
{xmpp_util:encode_timestamp(Now), Status}.