Removed custom date format. Use ISO string everywhere.
This commit is contained in:
@@ -136,9 +136,9 @@ async function clickhouseQuery(data: {
|
||||
...args
|
||||
} = data;
|
||||
const { insert } = clickhouse;
|
||||
const { getDateFormat, sendMessage } = kafka;
|
||||
const { sendMessage } = kafka;
|
||||
const eventId = uuid();
|
||||
const createdAt = getDateFormat(new Date());
|
||||
const createdAt = new Date().toISOString();
|
||||
|
||||
const message = {
|
||||
...args,
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -81,8 +81,8 @@ async function clickhouseQuery(data: {
|
||||
const { websiteId, sessionId, sessionData } = data;
|
||||
|
||||
const { insert } = clickhouse;
|
||||
const { getDateFormat, sendMessages } = kafka;
|
||||
const createdAt = getDateFormat(new Date());
|
||||
const { sendMessages } = kafka;
|
||||
const createdAt = new Date().toISOString();
|
||||
|
||||
const jsonKeys = flattenJSON(sessionData);
|
||||
|
||||
@@ -94,7 +94,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,
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user