From 624ab4a1903569abf7d3d51aed1a049470b94050 Mon Sep 17 00:00:00 2001 From: ananzh Date: Tue, 12 Sep 2023 19:19:57 +0000 Subject: [PATCH] [BUG] Fix buildPointSeriesData unit test fails due to local timezone Issue Resolved https://github.com/opensearch-project/OpenSearch-Dashboards/issues/4865 Signed-off-by: ananzh --- CHANGELOG.md | 1 + .../application/components/chart/utils/point_series.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1095899636ba..c9d74bc42c26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - [BUG] Fix management overview page duplicate rendering ([#4636](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4636)) - Fix broken app when management is turned off ([#4891](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4891)) - Correct the generated path for downloading plugins by their names on Windows ([#4953](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4953)) +- [BUG] Fix buildPointSeriesData unit test fails due to local timezone ([#4992](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4992)) ### 🚞 Infrastructure diff --git a/src/plugins/discover/public/application/components/chart/utils/point_series.test.ts b/src/plugins/discover/public/application/components/chart/utils/point_series.test.ts index 7348033e834f..b7a8ab2bfd43 100644 --- a/src/plugins/discover/public/application/components/chart/utils/point_series.test.ts +++ b/src/plugins/discover/public/application/components/chart/utils/point_series.test.ts @@ -31,8 +31,8 @@ describe('buildPointSeriesData', () => { intervalOpenSearchUnit: 'h', format: 'number', bounds: { - min: moment('2023-01-01'), - max: moment('2023-01-02'), + min: moment('2023-01-01T00:00:00Z'), + max: moment('2023-01-02T00:00:00Z'), }, }, },