mirror of
https://github.com/umami-software/umami.git
synced 2026-02-05 21:27:20 +01:00
Merge branch 'master' of https://github.com/umami-software/umami into dev
This commit is contained in:
commit
67164a72a0
4 changed files with 12 additions and 11 deletions
|
|
@ -75,7 +75,7 @@ function getDateSQL(field: string, unit: string, timezone?: string): string {
|
|||
|
||||
if (db === MYSQL) {
|
||||
if (timezone) {
|
||||
const tz = formatInTimeZone(new Date(), timezone, 'yyyy-MM-dd HH:mm:ss');
|
||||
const tz = formatInTimeZone(new Date(), timezone, 'xxx');
|
||||
return `date_format(convert_tz(${field},'+00:00','${tz}'), '${MYSQL_DATE_FORMATS[unit]}')`;
|
||||
}
|
||||
return `date_format(${field}, '${MYSQL_DATE_FORMATS[unit]}')`;
|
||||
|
|
@ -90,7 +90,7 @@ function getDateWeeklySQL(field: string, timezone?: string) {
|
|||
}
|
||||
|
||||
if (db === MYSQL) {
|
||||
const tz = formatInTimeZone(new Date(), timezone, 'yyyy-MM-dd HH:mm:ss');
|
||||
const tz = formatInTimeZone(new Date(), timezone, 'xxx');
|
||||
return `date_format(convert_tz(${field},'+00:00','${tz}'), '%w:%H')`;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue