diff options
author | Christophe Romain <christophe.romain@process-one.net> | 2017-09-27 12:34:40 +0200 |
---|---|---|
committer | Christophe Romain <christophe.romain@process-one.net> | 2017-09-27 12:34:40 +0200 |
commit | 8c026582ab8a85da94b681f0d2e73d5b33b59a4f (patch) | |
tree | b6f8e5fafa04abb56b550b69ae9bf9473901a1b1 | |
parent | Unbind unused variable (diff) |
Fix xref error
-rw-r--r-- | src/node_flat_sql.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/node_flat_sql.erl b/src/node_flat_sql.erl index 877948018..97f49c92c 100644 --- a/src/node_flat_sql.erl +++ b/src/node_flat_sql.erl @@ -1027,12 +1027,15 @@ rsm_page(Count, Index, Offset, Items) -> last = Last}. encode_stamp(Stamp) -> - case xmpp_utils:decode_timestamp(Stamp) of + case catch xmpp_util:decode_timestamp(Stamp) of {MS,S,US} -> encode_now({MS,S,US}); _ -> Stamp end. decode_stamp(Stamp) -> - xmpp_utils:encode_timestamp(decode_now(Stamp)). + case catch xmpp_util:encode_timestamp(decode_now(Stamp)) of + TimeStamp when is_binary(TimeStamp) -> TimeStamp; + _ -> Stamp + end. encode_now({T1, T2, T3}) -> <<(misc:i2l(T1, 6))/binary, ":", |