1
0
Fork 0
mirror of synced 2024-09-20 19:33:10 +12:00

Actually fix time zone problems this time.

This commit is contained in:
Sam Rose 2024-07-30 17:26:00 +01:00
parent aa7894604f
commit 383132d06c
No known key found for this signature in database
2 changed files with 5 additions and 1 deletions

View file

@ -406,7 +406,10 @@ class OracleIntegration extends Sql implements DatasourcePlus {
password: this.config.password,
connectString,
}
return await oracledb.getConnection(attributes)
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone
const connection = await oracledb.getConnection(attributes)
await connection.execute(`ALTER SESSION SET TIME_ZONE = '${tz}'`)
return connection
}
async create(query: SqlQuery | string): Promise<any[]> {

View file

@ -28,6 +28,7 @@ import {
import { isExternalTableID } from "../../integrations/utils"
import { helpers } from "@budibase/shared-core"
import { processString } from "@budibase/string-templates"
import { DateTime } from "mssql"
export * from "./utils"
export * from "./attachments"