Browse Source

fix: mongo_date/2 shall give user friendly value in the test environment

Kjell Winblad 2 years ago
parent
commit
b38461e50a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      apps/emqx_rule_engine/src/emqx_rule_funcs.erl

+ 1 - 1
apps/emqx_rule_engine/src/emqx_rule_funcs.erl

@@ -1193,7 +1193,7 @@ mongo_date(MillisecondsTimestamp) ->
 mongo_date(Timestamp, Unit) ->
 mongo_date(Timestamp, Unit) ->
     InsertedTimeUnit = time_unit(Unit),
     InsertedTimeUnit = time_unit(Unit),
     ScaledEpoch = erlang:convert_time_unit(Timestamp, InsertedTimeUnit, millisecond),
     ScaledEpoch = erlang:convert_time_unit(Timestamp, InsertedTimeUnit, millisecond),
-    convert_timestamp(ScaledEpoch).
+    mongo_date(ScaledEpoch).
 
 
 maybe_isodate_format(ErlTimestamp) ->
 maybe_isodate_format(ErlTimestamp) ->
     case emqx_rule_sqltester:is_test_runtime_env() of
     case emqx_rule_sqltester:is_test_runtime_env() of