mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix moment.js deprecation warning when running tests
This commit is contained in:
parent
b1691f1cd1
commit
2361e2ddd9
@ -81,8 +81,8 @@ describe('grafanaHeatmap', function () {
|
|||||||
getTimezone: sinon.stub().returns('utc')
|
getTimezone: sinon.stub().returns('utc')
|
||||||
},
|
},
|
||||||
range: {
|
range: {
|
||||||
from: moment.utc("01 Mar 2017 10: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"),
|
to: moment.utc("01 Mar 2017 11:00:00", 'DD MMM YYYY HH:mm:ss'),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -263,5 +263,5 @@ function getTicks(element, axisSelector) {
|
|||||||
|
|
||||||
function formatLocalTime(timeStr) {
|
function formatLocalTime(timeStr) {
|
||||||
let format = "HH:mm";
|
let format = "HH:mm";
|
||||||
return moment.utc(timeStr).local().format(format);
|
return moment.utc(timeStr, 'DD MMM YYYY HH:mm:ss').local().format(format);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user