Merge pull request #4 from rbkmoney/ED-156/ft/add_latest_clock

fix same usec
This commit is contained in:
Boris 2021-06-07 17:11:05 +03:00 committed by GitHub
commit c5572a9a22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -269,8 +269,8 @@ get_handler(ID, LimitContext) ->
-spec calculate_time_range(timestamp(), config()) -> time_range().
calculate_time_range(Timestamp, Config) ->
StartedAt = started_at(Config),
{StartDateTime, USec} = lim_range_codec:parse_timestamp(StartedAt),
{CurrentDateTime, USec} = lim_range_codec:parse_timestamp(Timestamp),
{StartDateTime, _USec0} = lim_range_codec:parse_timestamp(StartedAt),
{CurrentDateTime, _USec1} = lim_range_codec:parse_timestamp(Timestamp),
CurrentSec = calendar:datetime_to_gregorian_seconds(CurrentDateTime),
case time_range_type(Config) of
{calendar, Range} ->