mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Correctly pass in timezone into relational query. Closes #3975
This commit is contained in:
parent
a37de757a0
commit
a0886c0594
1 changed files with 2 additions and 2 deletions
|
|
@ -14,7 +14,7 @@ export async function getWeeklyTraffic(...args: [websiteId: string, filters: Que
|
||||||
}
|
}
|
||||||
|
|
||||||
async function relationalQuery(websiteId: string, filters: QueryFilters) {
|
async function relationalQuery(websiteId: string, filters: QueryFilters) {
|
||||||
const timezone = 'utc';
|
const { timezone = 'utc' } = filters;
|
||||||
const { rawQuery, getDateWeeklySQL, parseFilters } = prisma;
|
const { rawQuery, getDateWeeklySQL, parseFilters } = prisma;
|
||||||
const { filterQuery, joinSessionQuery, cohortQuery, queryParams } = parseFilters({
|
const { filterQuery, joinSessionQuery, cohortQuery, queryParams } = parseFilters({
|
||||||
...filters,
|
...filters,
|
||||||
|
|
@ -33,7 +33,7 @@ async function relationalQuery(websiteId: string, filters: QueryFilters) {
|
||||||
and website_event.created_at between {{startDate}} and {{endDate}}
|
and website_event.created_at between {{startDate}} and {{endDate}}
|
||||||
${filterQuery}
|
${filterQuery}
|
||||||
group by time
|
group by time
|
||||||
order by 2
|
order by 1
|
||||||
`,
|
`,
|
||||||
queryParams,
|
queryParams,
|
||||||
FUNCTION_NAME,
|
FUNCTION_NAME,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue