Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes inconsistent conversion dates in logs - 1.5.x #4952

Merged
merged 1 commit into from
Mar 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ void AdConversionTracking::StartTimer(
const uint64_t now = Time::NowInSeconds();

uint64_t start_timer_in;
if (queue_item.timestamp_in_seconds < now) {
start_timer_in = now - queue_item.timestamp_in_seconds;
if (now < queue_item.timestamp_in_seconds) {
start_timer_in = queue_item.timestamp_in_seconds - now;
} else {
start_timer_in = brave_base::random::Geometric(
kExpiredAdConversionFrequency);
Expand All @@ -175,9 +175,10 @@ void AdConversionTracking::StartTimer(
return;
}

BLOG(INFO) << "Started ad conversion timer for uuid " << queue_item.uuid
<< " and creative set id " << queue_item.creative_set_id << " which will"
" trigger on " << Time::FromDoubleT(now + start_timer_in);
BLOG(INFO) << "Started ad conversion timer for creative_instance_id "
<< queue_item.uuid << " with creative set id "
<< queue_item.creative_set_id << " which will trigger on "
<< Time::FromDoubleT(queue_item.timestamp_in_seconds);
}

void AdConversionTracking::StopTimer() {
Expand Down