From b89f3c442c3c005c5cf66dbd75d52c68634d3ba8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Tue, 15 Sep 2020 12:11:00 +0200 Subject: [PATCH] Use os time instead of system time in values returned by mod_time This timer should correctly work with time warps, and should fix issue #3390 --- src/mod_time.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod_time.erl b/src/mod_time.erl index 778405660..8f822cf78 100644 --- a/src/mod_time.erl +++ b/src/mod_time.erl @@ -55,7 +55,7 @@ process_local_iq(#iq{type = set, lang = Lang} = IQ) -> Txt = ?T("Value 'set' of 'type' attribute is not allowed"), xmpp:make_error(IQ, xmpp:err_not_allowed(Txt, Lang)); process_local_iq(#iq{type = get} = IQ) -> - Now = erlang:timestamp(), + Now = os:timestamp(), Now_universal = calendar:now_to_universal_time(Now), Now_local = calendar:universal_time_to_local_time(Now_universal), Seconds_diff =