25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-10-13 15:16:49 +02:00

Use correct timestamp when hibernation_time is not set at all

This commit is contained in:
Paweł Chmielowski 2022-03-07 17:38:04 +01:00
parent d5841785e1
commit 3520869e36

View File

@ -66,7 +66,7 @@ store_room(LServer, Host, Name, Opts, ChangesHints) ->
end,
SOpts = misc:term_to_expr(Opts2),
Timestamp = case lists:keyfind(hibernation_time, 1, Opts) of
false -> <<"1900-01-01 00:00:00">>;
false -> <<"1970-01-02 00:00:00">>;
{_, undefined} -> <<"1970-01-02 00:00:00">>;
{_, Time} -> usec_to_sql_timestamp(Time)
end,