mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-10 21:47:01 +02:00
Don't match integer() against float() value
This commit is contained in:
parent
a983df4848
commit
18d9f18642
|
@ -717,7 +717,7 @@ now_to_utc_string({MegaSecs, Secs, MicroSecs}, Precision) ->
|
||||||
{{Year, Month, Day}, {Hour, Minute, Second}} =
|
{{Year, Month, Day}, {Hour, Minute, Second}} =
|
||||||
calendar:now_to_universal_time({MegaSecs, Secs,
|
calendar:now_to_universal_time({MegaSecs, Secs,
|
||||||
MicroSecs}),
|
MicroSecs}),
|
||||||
Max = math:pow(10, Precision),
|
Max = round(math:pow(10, Precision)),
|
||||||
FracOfSec = case round(MicroSecs / math:pow(10, 6 - Precision)) of
|
FracOfSec = case round(MicroSecs / math:pow(10, 6 - Precision)) of
|
||||||
Max -> Max - 1; % don't overflow io_lib:format
|
Max -> Max - 1; % don't overflow io_lib:format
|
||||||
X -> X
|
X -> X
|
||||||
|
|
Loading…
Reference in New Issue
Block a user