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

This commit is contained in:
Kjell Winblad 2023-08-08 14:47:07 +02:00
parent 19d091eef1
commit b38461e50a
1 changed files with 1 additions and 1 deletions

View File

@ -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