From ff5eeb49fa9ce4b87769ca8593c291c3124a2db4 Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Wed, 14 Jan 2015 15:09:58 +0100 Subject: [PATCH] Fix datepicker timezone issues. --- web/static/js/graph.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/web/static/js/graph.js b/web/static/js/graph.js index 9612fc239..571bde282 100644 --- a/web/static/js/graph.js +++ b/web/static/js/graph.js @@ -244,14 +244,7 @@ Prometheus.Graph.prototype.getEndDate = function() { if (!self.endDate || !self.endDate.val()) { return null; } - // - // This is returning the time set according to the system clock, - // but the datetimepicker is converting this to UTC, which is - // causing the time to decrease instead of increase. It should - // be increasing by 30min, but UTC is one hour behind berlin time, - // so incrementing UTC by 30min e.g. decrements the time the user sees by 30min. - // - return new Date(self.endDate.val()).getTime(); + return self.endDate.data('datetimepicker').getDate().getTime(); }; Prometheus.Graph.prototype.getOrSetEndDate = function() {