apucher closed pull request #3582: [TE] frontend - harleyjj/manage - align
startDate at startOf() instea…
URL: https://github.com/apache/incubator-pinot/pull/3582
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/thirdeye/thirdeye-frontend/app/utils/utils.js
b/thirdeye/thirdeye-frontend/app/utils/utils.js
index 667e8dd3b4..8a0bbae5d7 100644
--- a/thirdeye/thirdeye-frontend/app/utils/utils.js
+++ b/thirdeye/thirdeye-frontend/app/utils/utils.js
@@ -1,7 +1,7 @@
import d3 from 'd3';
import { isNone } from '@ember/utils';
import moment from 'moment';
-import { splitFilterFragment, toFilterMap } from
'thirdeye-frontend/utils/rca-utils';
+import { splitFilterFragment, toFilterMap, makeTime } from
'thirdeye-frontend/utils/rca-utils';
/**
* The Promise returned from fetch() won't reject on HTTP error status even if
the response is an HTTP 404 or 500.
@@ -94,7 +94,10 @@ export function humanizeScore(f) {
* Helps with shorthand for repetitive date generation
*/
export function buildDateEod(unit, type) {
- return moment().subtract(unit, type).endOf('day').utc();
+ if (unit === 1) {
+ return makeTime().startOf('day');
+ }
+ return makeTime().subtract(unit-1, type).startOf('day');
}
/**
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]