Skip to content

Commit

Permalink
Treat dateRange as UTC
Browse files Browse the repository at this point in the history
  • Loading branch information
hakobera committed Nov 17, 2015
1 parent 7e08518 commit ad19f2d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rd_ui/app/scripts/visualizations/date_range_selector.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
});

$scope.$watch('dateRangeHuman', function (dateRangeHuman, oldDateRangeHuman, scope) {
var newDateRangeMin = moment(dateRangeHuman.min);
var newDateRangeMax = moment(dateRangeHuman.max);
var newDateRangeMin = moment.utc(dateRangeHuman.min);
var newDateRangeMax = moment.utc(dateRangeHuman.max);
if (!newDateRangeMin ||
!newDateRangeMax ||
!newDateRangeMin.isValid() ||
Expand All @@ -34,8 +34,8 @@
scope.dateRangeHuman = oldDateRangeHuman;
return;
}
scope.dateRange.min = newDateRangeMin.startOf('day');
scope.dateRange.max = newDateRangeMax.endOf('day');
scope.dateRange.min = newDateRangeMin;
scope.dateRange.max = newDateRangeMax;
}, true);
}]
}
Expand Down

0 comments on commit ad19f2d

Please sign in to comment.