From d107ec9e2a5bc4c7770a6677ab09681e9e07165d Mon Sep 17 00:00:00 2001 From: Hanbyul Jo Date: Thu, 12 Sep 2024 15:34:11 -0400 Subject: [PATCH] Convert the time to usertzdate --- app/scripts/components/exploration/analysis-data.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/scripts/components/exploration/analysis-data.ts b/app/scripts/components/exploration/analysis-data.ts index d1779cb6a..7038afe7e 100644 --- a/app/scripts/components/exploration/analysis-data.ts +++ b/app/scripts/components/exploration/analysis-data.ts @@ -8,6 +8,7 @@ import { DatasetStatus } from './types.d.ts'; import { ExtendedError } from './data-utils'; +import { utcString2userTzDate } from '$utils/date'; import { fixAoiFcForStacSearch, getFilterPayload @@ -58,10 +59,9 @@ async function getDatasetAssets( }, opts ); - return { assets: searchReqRes.data.features.map((o) => ({ - date: new Date(o.properties.start_datetime || o.properties.datetime), + date: utcString2userTzDate(o.properties.start_datetime || o.properties.datetime), url: o.assets[assets].href })) }; @@ -218,6 +218,7 @@ export async function requestDatasetTimeseriesData({ ); } ); + onProgress({ status: DatasetStatus.LOADING, error: null,