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:
parent
b88fda9494
commit
4247501dc6
2 changed files with 13 additions and 10 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue