mirror of
https://github.com/umami-software/umami.git
synced 2025-12-06 01:18:00 +01:00
revert getDateStringSQL for CH
This commit is contained in:
parent
5ded9abbfe
commit
a3f32b036d
1 changed files with 3 additions and 3 deletions
|
|
@ -51,12 +51,12 @@ function getUTCString(date?: Date | string | number) {
|
|||
return formatInTimeZone(date || new Date(), 'UTC', 'yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
|
||||
function getDateStringSQL(field: string, unit: string, timezone?: string) {
|
||||
function getDateStringSQL(data: any, unit: string = 'utc', timezone?: string) {
|
||||
if (timezone) {
|
||||
return `formatDateTime(${field}, '${CLICKHOUSE_DATE_FORMATS[unit]}', '${timezone}')`;
|
||||
return `formatDateTime(${data}, '${CLICKHOUSE_DATE_FORMATS[unit]}', '${timezone}')`;
|
||||
}
|
||||
|
||||
return `formatDateTime(${field}, '${CLICKHOUSE_DATE_FORMATS[unit]}')`;
|
||||
return `formatDateTime(${data}, '${CLICKHOUSE_DATE_FORMATS[unit]}')`;
|
||||
}
|
||||
|
||||
function getDateSQL(field: string, unit: string, timezone?: string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue