mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
fix clickhouse date timezone issues
This commit is contained in:
parent
fc3c39be3c
commit
55ba7d95ab
7 changed files with 7647 additions and 4840 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { CLICKHOUSE, RELATIONAL, KAFKA, URL_LENGTH } from 'lib/constants';
|
||||
import {
|
||||
getDateFormatClickhouse,
|
||||
getDateFormatKafka,
|
||||
prisma,
|
||||
rawQueryClickhouse,
|
||||
runAnalyticsQuery,
|
||||
|
|
@ -50,7 +51,7 @@ async function clickhouseQuery(website_id, { event_uuid, session_uuid, url, even
|
|||
|
||||
return rawQueryClickhouse(
|
||||
`
|
||||
insert into umami_dev.event (created_at, website_id, session_uuid, url, event_name)
|
||||
insert into umami.event (created_at, website_id, session_uuid, url, event_name)
|
||||
values (${getDateFormatClickhouse(new Date())}, $1, $2, $3, $4);`,
|
||||
params,
|
||||
);
|
||||
|
|
@ -61,6 +62,7 @@ async function kafkaQuery(website_id, { event_uuid, session_uuid, url, event_nam
|
|||
event_uuid: event_uuid,
|
||||
website_id: website_id,
|
||||
session_uuid: session_uuid,
|
||||
created_at: getDateFormatKafka(new Date()),
|
||||
url: url?.substr(0, URL_LENGTH),
|
||||
event_name: event_name?.substr(0, 50),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue