Skip to content

Commit

Permalink
Merge pull request #19076 from hpcc-systems/hpcc-32586-wu-formatQuery…
Browse files Browse the repository at this point in the history
…-dates

HPCC-32586 ECL Watch v9 fix WU filter incorrect dates
  • Loading branch information
GordonSmith authored Sep 5, 2024
2 parents 7e27807 + bb6eafb commit e682816
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion esp/src/src-react/components/Files.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ function formatQuery(_filter): { [id: string]: any } {
delete filter.NotInSuperFiles;
delete filter.Indexes;
if (filter.StartDate) {
if (filter.StartDate.indexOf("Z") < 0) { filter.StartDate += ":00.000Z"; }
filter.StartDate = new Date(filter.StartDate).toISOString();
}
if (filter.EndDate) {
filter.EndDate = new Date(filter.StartDate).toISOString();
if (filter.EndDate.indexOf("Z") < 0) { filter.EndDate += ":00.000Z"; }
filter.EndDate = new Date(filter.EndDate).toISOString();
}
return filter;
}
Expand Down
2 changes: 2 additions & 0 deletions esp/src/src/ESPWorkunit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,11 @@ export function formatQuery(_filter): { [id: string]: any } {
delete filter.LastNDays;
} else {
if (filter.StartDate) {
if (filter.StartDate.indexOf("Z") < 0) { filter.StartDate += ":00.000Z"; }
filter.StartDate = new Date(filter.StartDate).toISOString();
}
if (filter.EndDate) {
if (filter.EndDate.indexOf("Z") < 0) { filter.EndDate += ":00.000Z"; }
filter.EndDate = new Date(filter.EndDate).toISOString();
}
}
Expand Down

0 comments on commit e682816

Please sign in to comment.