mirror of
https://github.com/immich-app/static-pages.git
synced 2026-09-30 13:23:05 +08:00
fix(sql-tools): force ISO DateStyle on postgres connections (#719)
This commit is contained in:
@@ -38,6 +38,7 @@ export const createPostgres = (options: DatabasePostgresOptions = {}) => {
|
||||
connection = { connectionType: 'url', url: 'postgres://postgres:postgres@localhost:5432/postgres' },
|
||||
maxConnections = 10,
|
||||
timeZone = 'UTC',
|
||||
dateStyle = 'ISO',
|
||||
convertToJsDate = true,
|
||||
convertBigIntToNumber = true,
|
||||
onNotice,
|
||||
@@ -76,6 +77,7 @@ export const createPostgres = (options: DatabasePostgresOptions = {}) => {
|
||||
max: maxConnections,
|
||||
connection: {
|
||||
TimeZone: timeZone,
|
||||
DateStyle: dateStyle,
|
||||
},
|
||||
types,
|
||||
onnotice: onNotice,
|
||||
|
||||
@@ -10,6 +10,7 @@ export type DatabasePostgresOptions = {
|
||||
connection?: DatabaseConnectionParams;
|
||||
maxConnections?: number;
|
||||
timeZone?: string;
|
||||
dateStyle?: string;
|
||||
convertToJsDate?: boolean;
|
||||
convertBigIntToNumber?: boolean;
|
||||
onNotice?: (notice: Notice) => void;
|
||||
|
||||
Reference in New Issue
Block a user