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

Fix compilation on OTP < 21 and remove dialyzer warning

This commit is contained in:
Paweł Chmielowski 2022-02-18 17:21:22 +01:00
parent b88fda9494
commit 4247501dc6
2 changed files with 13 additions and 10 deletions

View file

@ -523,7 +523,8 @@ clean_tables(ServerHost) ->
end.
usec_to_sql_timestamp(Timestamp) ->
case calendar:system_time_to_universal_time(Timestamp, microsecond) of
TS = misc:usec_to_now(Timestamp),
case calendar:now_to_universal_time(TS) of
{{Year, Month, Day}, {Hour, Minute, Second}} ->
list_to_binary(io_lib:format("~4..0B-~2..0B-~2..0B "
"~2..0B:~2..0B:~2..0B",