fix: update correct format in URL in case of custom date time (#4371)

This commit is contained in:
Vikrant Gupta 2024-01-15 18:46:18 +05:30 committed by GitHub
parent c28f367f46
commit cbf150ef7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,8 +223,14 @@ function DateTimeSelection({
setLocalStorageKey('endTime', endTimeMoment.toString()); setLocalStorageKey('endTime', endTimeMoment.toString());
updateLocalStorageForRoutes('custom'); updateLocalStorageForRoutes('custom');
if (!isLogsExplorerPage) { if (!isLogsExplorerPage) {
urlQuery.set(QueryParams.startTime, startTimeMoment.toString()); urlQuery.set(
urlQuery.set(QueryParams.endTime, endTimeMoment.toString()); QueryParams.startTime,
startTimeMoment?.toDate().getTime().toString(),
);
urlQuery.set(
QueryParams.endTime,
endTimeMoment?.toDate().getTime().toString(),
);
const generatedUrl = `${location.pathname}?${urlQuery.toString()}`; const generatedUrl = `${location.pathname}?${urlQuery.toString()}`;
history.replace(generatedUrl); history.replace(generatedUrl);
} }