diff --git a/tests/playwright/setup/xcdb-records.ts b/tests/playwright/setup/xcdb-records.ts index a0267c9680..75df0bb2fa 100644 --- a/tests/playwright/setup/xcdb-records.ts +++ b/tests/playwright/setup/xcdb-records.ts @@ -1,6 +1,6 @@ import { ColumnType, UITypes } from 'nocodb-sdk'; -const rowMixedValue = (column: ColumnType, index: number) => { +const rowMixedValue = (column: ColumnType, index: number, db?: string) => { // Array of country names const countries = [ 'Afghanistan', @@ -39,7 +39,7 @@ const rowMixedValue = (column: ColumnType, index: number) => { // compute timezone offset const offset = new Date().getTimezoneOffset(); const timezoneOffset = - (offset <= 0 ? '+' : '-') + + (db === 'mysql' ? (offset < 0 ? '+' : '-') : offset <= 0 ? '+' : '-') + String(Math.abs(Math.round(offset / 60))).padStart(2, '0') + ':' + String(Math.abs(offset % 60)).padStart(2, '0'); diff --git a/tests/playwright/tests/filters.spec.ts b/tests/playwright/tests/filters.spec.ts index 6fe168b150..2bc6b30f64 100644 --- a/tests/playwright/tests/filters.spec.ts +++ b/tests/playwright/tests/filters.spec.ts @@ -294,7 +294,7 @@ test.describe('Filter Tests: Numerical', () => { Duration: rowMixedValue(columns[5], i), Rating: rowMixedValue(columns[6], i), Year: rowMixedValue(columns[7], i), - Time: rowMixedValue(columns[8], i), + Time: rowMixedValue(columns[8], i, context.dbType), }; rowAttributes.push(row); }