Skip to content

Commit

Permalink
Convert the time to usertzdate
Browse files Browse the repository at this point in the history
  • Loading branch information
hanbyul-here committed Sep 12, 2024
1 parent 4a6c978 commit d107ec9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/scripts/components/exploration/analysis-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
DatasetStatus
} from './types.d.ts';
import { ExtendedError } from './data-utils';
import { utcString2userTzDate } from '$utils/date';
import {
fixAoiFcForStacSearch,
getFilterPayload
Expand Down Expand Up @@ -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
}))
};
Expand Down Expand Up @@ -218,6 +218,7 @@ export async function requestDatasetTimeseriesData({
);
}
);

onProgress({
status: DatasetStatus.LOADING,
error: null,
Expand Down

0 comments on commit d107ec9

Please sign in to comment.