mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
Fixed MySQL.
This commit is contained in:
parent
d43293da72
commit
e80b4ffcae
@ -1,5 +1,6 @@
|
|||||||
generator client {
|
generator client {
|
||||||
provider = "prisma-client-js"
|
provider = "prisma-client-js"
|
||||||
|
binaryTargets = ["native", "linux-musl-openssl-3.0.x", "linux-musl-arm64-openssl-3.0.x"]
|
||||||
}
|
}
|
||||||
|
|
||||||
datasource db {
|
datasource db {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
generator client {
|
generator client {
|
||||||
provider = "prisma-client-js"
|
provider = "prisma-client-js"
|
||||||
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
|
binaryTargets = ["native", "linux-musl-openssl-3.0.x", "linux-musl-arm64-openssl-3.0.x"]
|
||||||
}
|
}
|
||||||
|
|
||||||
datasource db {
|
datasource db {
|
||||||
|
@ -75,7 +75,7 @@ function getDateSQL(field: string, unit: string, timezone?: string): string {
|
|||||||
|
|
||||||
if (db === MYSQL) {
|
if (db === MYSQL) {
|
||||||
if (timezone) {
|
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(convert_tz(${field},'+00:00','${tz}'), '${MYSQL_DATE_FORMATS[unit]}')`;
|
||||||
}
|
}
|
||||||
return `date_format(${field}, '${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) {
|
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')`;
|
return `date_format(convert_tz(${field},'+00:00','${tz}'), '%w:%H')`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user