25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Fix timestamp processing

This commit is contained in:
Evgeniy Khramtsov 2013-07-23 15:24:42 +10:00
parent 8ce22b790d
commit 807a1fe164

View File

@ -920,9 +920,13 @@ import(LServer) ->
To = #jid{} = jlib:string_to_jid(
xml:get_attr_s(<<"to">>, El#xmlel.attrs)),
Stamp = xml:get_path_s(El, [{elem, <<"delay">>},
{elem, <<"stamp">>},
cdata]),
{_, _, _} = TS = jlib:datetime_string_to_timestamp(Stamp),
{attr, <<"stamp">>}]),
TS = case jlib:datetime_string_to_timestamp(Stamp) of
{_, _, _} = Now ->
Now;
undefined ->
now()
end,
Expire = find_x_expire(TS, El#xmlel.children),
#offline_msg{us = {LUser, LServer},
from = From, to = To,