- Notifications
You must be signed in to change notification settings - Fork928
feat: use tz_offset when doing deployment dau query#7736
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -453,7 +453,7 @@ func (q *fakeQuerier) GetTemplateDAUs(_ context.Context, arg database.GetTemplat | |||
continue | |||
} | |||
date := as.CreatedAt.UTC().Add(time.Duration(arg.TzOffset) * time.Hour).Truncate(time.Hour * 24) | |||
date := as.CreatedAt.UTC().Add(time.Duration(arg.TzOffset) * time.Hour * -1).Truncate(time.Hour * 24) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
🤔 This change didn't break anything... which means that our unit tests probably aren't checking something that they should.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
You are half right.
I forgot to change it in the Dau dbfake function, which does break the unit test.
The template test does not break because I reverted the Template DAU to only useUTC
again for performance reasons. So this is always0
as the offset.
tl;dr fixing it in the spot that is useddoes break the test
Fixes#7275