Skip to content

Commit

Permalink
fix timespan referencing to same values (#56601) (#56612)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 authored Feb 3, 2020
1 parent 479223b commit 4aa7275
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 4aa7275

Please sign in to comment.