From a66d01d6f016af6e603cb72862178309b64a8ad8 Mon Sep 17 00:00:00 2001 From: Kjell Winblad Date: Fri, 14 Apr 2023 12:48:03 +0200 Subject: [PATCH] style: remove code duplication Co-authored-by: Thales Macedo Garitezi --- apps/emqx_rule_engine/src/emqx_rule_funcs.erl | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/apps/emqx_rule_engine/src/emqx_rule_funcs.erl b/apps/emqx_rule_engine/src/emqx_rule_funcs.erl index 7f7662b1b..dfbcdefed 100644 --- a/apps/emqx_rule_engine/src/emqx_rule_funcs.erl +++ b/apps/emqx_rule_engine/src/emqx_rule_funcs.erl @@ -1087,12 +1087,7 @@ format_date(TimeUnit, Offset, FormatString, TimeEpoch) -> ). date_to_unix_ts(TimeUnit, FormatString, InputString) -> - emqx_rule_date:parse_date( - time_unit(TimeUnit), - "Z", - emqx_plugin_libs_rule:str(FormatString), - emqx_plugin_libs_rule:str(InputString) - ). + date_to_unix_ts(TimeUnit, "Z", FormatString, InputString). date_to_unix_ts(TimeUnit, Offset, FormatString, InputString) -> emqx_rule_date:parse_date(