mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
feat(timepicker): added new relative time option , will set time range to midnight to now, closes #1186
This commit is contained in:
@@ -186,7 +186,10 @@ function (angular, _, kbn, InfluxSeries, InfluxQueryBuilder) {
|
||||
|
||||
function getInfluxTime(date) {
|
||||
if (_.isString(date)) {
|
||||
return date.replace('now', 'now()').replace('-', ' - ');
|
||||
if (date.indexOf('now') >= 0) {
|
||||
return date.replace('now', 'now()').replace('-', ' - ');
|
||||
}
|
||||
date = kbn.parseDate(date);
|
||||
}
|
||||
|
||||
return to_utc_epoch_seconds(date);
|
||||
|
||||
Reference in New Issue
Block a user