Skip to content

Commit 0db2d07

Browse files
committed
Merge pull request grafana#2871 from mtanda/prometheus_time_fix
fix prometheus time conversion
2 parents 5e34823 + 5e19fdb commit 0db2d07

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

public/app/plugins/datasource/prometheus/datasource.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -271,12 +271,6 @@ function (angular, _, moment, dateMath) {
271271

272272
function getPrometheusTime(date, roundUp) {
273273
if (_.isString(date)) {
274-
if (date === 'now') {
275-
return 'now()';
276-
}
277-
if (date.indexOf('now-') >= 0 && date.indexOf('/') === -1) {
278-
return date.replace('now', 'now()').replace('-', ' - ');
279-
}
280274
date = dateMath.parse(date, roundUp);
281275
}
282276
return (date.valueOf() / 1000).toFixed(0);

0 commit comments

Comments
 (0)