OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.
transform event with correct date converter
Carl-Gerhard Lindesvärdfa6a1e497898
diff --git a/packages/db/src/services/event.service.ts b/packages/db/src/services/event.service.tsindex cfc3536b3..1bd5b1f53 100644--- a/packages/db/src/services/event.service.ts+++ b/packages/db/src/services/event.service.ts@@ -4,7 +4,12 @@ import { omit } from 'ramda';import { randomSplitName, toDots } from '@mixan/common';import { redis, redisPub } from '@mixan/redis';-import { ch, chQuery, formatClickhouseDate } from '../clickhouse-client';+import {+ ch,+ chQuery,+ convertClickhouseDateToJs,+ formatClickhouseDate,+} from '../clickhouse-client';import type { Prisma } from '../prisma-client';import { db } from '../prisma-client';@@ -40,7 +45,7 @@ export function transformEvent(profileId: event.profile_id,projectId: event.project_id,properties: event.properties,- createdAt: new Date(event.created_at),+ createdAt: convertClickhouseDateToJs(event.created_at),country: event.country,city: event.city,region: event.region,