Skip to content

Commit

Permalink
fix timespan referencing to same values (elastic#56601) (elastic#56612)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Feb 4, 2020
1 parent 58536f8 commit f6daca1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import moment from 'moment';
import { APICaller } from 'kibana/server';
import { CursorPagination } from '../adapter_types';
import { INDEX_NAMES } from '../../../../../common/constants';
Expand Down Expand Up @@ -97,7 +98,7 @@ export class QueryContext {
// behavior.

const tsEnd = parseRelativeDate(this.dateRangeEnd, { roundUp: true })!;
const tsStart = tsEnd.subtract(5, 'minutes');
const tsStart = moment(tsEnd).subtract(5, 'minutes');

return {
range: {
Expand Down

0 comments on commit f6daca1

Please sign in to comment.