Skip to content

Commit

Permalink
fix moment.js deprecation warning when running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DanCech committed Apr 27, 2017
1 parent b1691f1 commit 2361e2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions public/app/plugins/panel/heatmap/specs/renderer_specs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ describe('grafanaHeatmap', function () {
getTimezone: sinon.stub().returns('utc')
},
range: {
from: moment.utc("01 Mar 2017 10:00:00"),
to: moment.utc("01 Mar 2017 11:00:00"),
from: moment.utc("01 Mar 2017 10:00:00", 'DD MMM YYYY HH:mm:ss'),
to: moment.utc("01 Mar 2017 11:00:00", 'DD MMM YYYY HH:mm:ss'),
},
};

Expand Down Expand Up @@ -263,5 +263,5 @@ function getTicks(element, axisSelector) {

function formatLocalTime(timeStr) {
let format = "HH:mm";
return moment.utc(timeStr).local().format(format);
return moment.utc(timeStr, 'DD MMM YYYY HH:mm:ss').local().format(format);
}

0 comments on commit 2361e2d

Please sign in to comment.