From deac3a1a031ff81962cb0227faba794564dbf7df Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Mon, 8 May 2023 21:05:10 +0530 Subject: [PATCH] test: updates for mysql extDB handling Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- tests/playwright/tests/db/timezone.spec.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/playwright/tests/db/timezone.spec.ts b/tests/playwright/tests/db/timezone.spec.ts index d127408c1d..4fb6e2ab27 100644 --- a/tests/playwright/tests/db/timezone.spec.ts +++ b/tests/playwright/tests/db/timezone.spec.ts @@ -460,8 +460,8 @@ test.describe('External DB - DateTime column', async () => { DatetimeWithTz: ['2023-04-27 10:00', getDateTimeInLocalTimeZone('2023-04-27 04:30:00+00:00')], }, mysql: { - DatetimeWithoutTz: ['2023-04-27 10:00', '2023-04-27 04:30'], - DatetimeWithTz: ['2023-04-27 10:00', '2023-04-27 04:30'], + DatetimeWithoutTz: ['2023-04-27 10:00', getDateTimeInLocalTimeZone('2023-04-27 04:30:00+00:00')], + DatetimeWithTz: ['2023-04-27 10:00', getDateTimeInLocalTimeZone('2023-04-27 04:30:00+00:00')], }, }; @@ -616,8 +616,12 @@ test.describe('External DB - DateTime column', async () => { new Date('2023-04-27T10:00:00').toISOString(), ]; } else if (isMysql(context)) { - expectedDateTimeWithoutTz = ['2023-04-27 10:00:00', '2023-04-27 04:30:00', '2023-04-27 10:00:00']; - expectedDateTimeWithTz = ['2023-04-27 10:00:00', '2023-04-27 04:30:00', '2023-04-27 10:00:00']; + expectedDateTimeWithoutTz = [ + '2023-04-27 10:00:00+00:00', + '2023-04-27 04:30:00+00:00', + '2023-04-27 04:30:00+00:00', + ]; + expectedDateTimeWithTz = ['2023-04-27 10:00:00+00:00', '2023-04-27 04:30:00+00:00', '2023-04-27 04:30:00+00:00']; } // reset seconds to 00 using string functions in dateTimeWithoutTz