diff --git a/tests/playwright/tests/db/timezone.spec.ts b/tests/playwright/tests/db/timezone.spec.ts index d547926881..06e13fc889 100644 --- a/tests/playwright/tests/db/timezone.spec.ts +++ b/tests/playwright/tests/db/timezone.spec.ts @@ -644,15 +644,14 @@ test.describe.serial('External DB - DateTime column', async () => { const records = await api.dbTableRow.list('noco', context.project.id, table_data.id, { limit: 10 }); const formattedOffset = getBrowserTimezoneOffset(); - // console.log(getDateTimeInUTCTimeZone(`${expectedDisplayValue[0]}${formattedOffset}`)); - // console.log(getDateTimeInUTCTimeZone(`${expectedDisplayValue[1]}${formattedOffset}`)); - - expect(records.list[2]['formula-1']).toEqual( - getDateTimeInUTCTimeZone(`${expectedDisplayValue[0]}${formattedOffset}`) - ); - expect(records.list[2]['formula-2']).toEqual( - getDateTimeInUTCTimeZone(`${expectedDisplayValue[1]}${formattedOffset}`) - ); + // set seconds to 00 for comparison (API response has non zero seconds) + let record = records.list[2]['formula-1']; + const formula_1 = record.substring(0, 17) + '00' + record.substring(19); + expect(formula_1).toEqual(getDateTimeInUTCTimeZone(`${expectedDisplayValue[0]}${formattedOffset}`)); + + record = records.list[2]['formula-2']; + const formula_2 = record.substring(0, 17) + '00' + record.substring(19); + expect(formula_2).toEqual(getDateTimeInUTCTimeZone(`${expectedDisplayValue[1]}${formattedOffset}`)); } }