Skip to content
This repository was archived by the owner on Mar 2, 2022. It is now read-only.

Commit cbfc9e9

Browse files
Merge pull request #2 from rabbitmq/rabbitmq-server-233
Support the new Time API in Erlang 18.0
2 parents 189b3a8 + 70fdd88 commit cbfc9e9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rabbit_clusterer_config.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ create_node_id() ->
140140
%% started at this stage. We only need a fresh node_id when we're
141141
%% a virgin node. But we also want to ensure that when we are a
142142
%% virgin node our node id will be different from if we existed
143-
%% previously, hence the use of now() which can go wrong if time
144-
%% is set backwards, but we hope that won't happen.
145-
erlang:md5(term_to_binary({node(), now()})).
143+
%% previously, hence the use of erlang:system_time() which can go
144+
%% wrong if time is set backwards, but we hope that won't happen.
145+
erlang:md5(term_to_binary({node(), time_compat:erlang_system_time()})).
146146

147147
%%----------------------------------------------------------------------------
148148

0 commit comments

Comments
 (0)