From 383132d06c5301596f287f93d49a52b269651de8 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Tue, 30 Jul 2024 17:26:00 +0100 Subject: [PATCH 1/2] Actually fix time zone problems this time. --- packages/server/src/integrations/oracle.ts | 5 ++++- packages/server/src/utilities/rowProcessor/index.ts | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/server/src/integrations/oracle.ts b/packages/server/src/integrations/oracle.ts index 41762576dd..7895692076 100644 --- a/packages/server/src/integrations/oracle.ts +++ b/packages/server/src/integrations/oracle.ts @@ -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 { diff --git a/packages/server/src/utilities/rowProcessor/index.ts b/packages/server/src/utilities/rowProcessor/index.ts index 62a3b2dd74..82676442dc 100644 --- a/packages/server/src/utilities/rowProcessor/index.ts +++ b/packages/server/src/utilities/rowProcessor/index.ts @@ -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" From d7199c9def6099571d0cc542aeab07047800320d Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Tue, 30 Jul 2024 17:41:39 +0100 Subject: [PATCH 2/2] Fix a few more clob problems. --- packages/backend-core/src/sql/sql.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/backend-core/src/sql/sql.ts b/packages/backend-core/src/sql/sql.ts index e41d744812..fc712cb3c3 100644 --- a/packages/backend-core/src/sql/sql.ts +++ b/packages/backend-core/src/sql/sql.ts @@ -209,6 +209,7 @@ class InternalBuilder { schema.type === FieldType.STRING || schema.type === FieldType.LONGFORM || schema.type === FieldType.BB_REFERENCE_SINGLE || + schema.type === FieldType.BB_REFERENCE || schema.type === FieldType.OPTIONS || schema.type === FieldType.BARCODEQR ) {