Removed custom date format. Use ISO string everywhere.

This commit is contained in:
Mike Cao 2024-08-13 22:16:21 -07:00
parent 0bd57bb158
commit 04de691893
7 changed files with 7 additions and 25 deletions

View file

@ -61,7 +61,7 @@ async function clickhouseQuery(data: {
const { websiteId, sessionId, eventId, urlPath, eventName, eventData, createdAt } = data;
const { insert } = clickhouse;
const { getDateFormat, sendMessages } = kafka;
const { sendMessages } = kafka;
const jsonKeys = flattenJSON(eventData);
@ -76,7 +76,7 @@ async function clickhouseQuery(data: {
data_type: dataType,
string_value: getStringValue(value, dataType),
number_value: dataType === DATA_TYPE.number ? value : null,
date_value: dataType === DATA_TYPE.date ? getDateFormat(value) : null,
date_value: dataType === DATA_TYPE.date ? value?.toISOString() : null,
created_at: createdAt,
};
});