From c29354327a3207d48e0a05f628af2aa6b5476bfc Mon Sep 17 00:00:00 2001 From: Andrey Dolzhikov Date: Wed, 4 Sep 2024 08:32:11 -0400 Subject: [PATCH] fix tests --- .../workspaces/view_model/m_view_data_generator.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/devextreme/js/__internal/scheduler/workspaces/view_model/m_view_data_generator.ts b/packages/devextreme/js/__internal/scheduler/workspaces/view_model/m_view_data_generator.ts index 6c72f7b1d59c..193107b0bb31 100644 --- a/packages/devextreme/js/__internal/scheduler/workspaces/view_model/m_view_data_generator.ts +++ b/packages/devextreme/js/__internal/scheduler/workspaces/view_model/m_view_data_generator.ts @@ -466,9 +466,10 @@ export class ViewDataGenerator { startViewDateTime + millisecondsOffset + offsetByCount + viewOffset, ); - const timeZoneDifference = isStartViewDateDuringDST - ? 0 - : dateUtils.getTimezonesDifference(startViewDate, currentDate); + let timeZoneDifference = 0; + if (!isStartViewDateDuringDST) { + timeZoneDifference = Math.max(0, dateUtils.getTimezonesDifference(startViewDate, currentDate)); + } currentDate.setTime(currentDate.getTime() + timeZoneDifference);