Skip to content

Commit

Permalink
Make sure to is 'now' and not the same as from (#81524)
Browse files Browse the repository at this point in the history
* Make sure `to` is 'now' and not the same as `from`

* Revert "Make sure `to` is 'now' and not the same as `from`"

This reverts commit 48e8d08.

* Ensure `to` is properly rounded up to prevent `from` and `to` being identical

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
Joel Griffith and kibanamachine authored Oct 26, 2020
1 parent 34af716 commit 932e92b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class GetCsvReportPanelAction implements ActionDefinition<ActionContext>
const filename = embeddable.getSavedSearch().title;
const timezone = kibanaTimezone === 'Browser' ? moment.tz.guess() : kibanaTimezone;
const fromTime = dateMath.parse(from);
const toTime = dateMath.parse(to);
const toTime = dateMath.parse(to, { roundUp: true });

if (!fromTime || !toTime) {
return this.onGenerationFail(
Expand Down

0 comments on commit 932e92b

Please sign in to comment.