Skip to content

Commit

Permalink
Merge pull request #359 from rashidkpc/master
Browse files Browse the repository at this point in the history
Fix for utc correction bug. Closes #337
  • Loading branch information
Rashid Khan committed Aug 13, 2013
2 parents c92029a + d1b430f commit e57aba1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions panels/timepicker/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ angular.module('kibana.timepicker', [])
// If time picker is defined (usually is) TOFIX: Horrible parsing
if(!(_.isUndefined($scope.timepicker))) {
from = $scope.panel.mode === 'relative' ? moment(kbn.time_ago($scope.panel.timespan)) :
moment(moment.utc($scope.timepicker.from.date).format('MM/DD/YYYY') + " " + $scope.timepicker.from.time,'MM/DD/YYYY HH:mm:ss');
moment(moment($scope.timepicker.from.date).format('MM/DD/YYYY') + " " + $scope.timepicker.from.time,'MM/DD/YYYY HH:mm:ss');
to = $scope.panel.mode !== 'absolute' ? moment() :
moment(moment.utc($scope.timepicker.to.date).format('MM/DD/YYYY') + " " + $scope.timepicker.to.time,'MM/DD/YYYY HH:mm:ss');
moment(moment($scope.timepicker.to.date).format('MM/DD/YYYY') + " " + $scope.timepicker.to.time,'MM/DD/YYYY HH:mm:ss');
// Otherwise (probably initialization)
} else {
from = $scope.panel.mode === 'relative' ? moment(kbn.time_ago($scope.panel.timespan)) :
Expand Down

0 comments on commit e57aba1

Please sign in to comment.