From 36cb2fd39dc6a769258d227bc9888e2d2697a1ec Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 27 Mar 2017 08:49:05 -0600 Subject: [PATCH] Calendar - Fix summer time change east of GMT caused 'today' to be off by one day in planner view --- calendar/js/et2_widget_planner.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/calendar/js/et2_widget_planner.js b/calendar/js/et2_widget_planner.js index b4a637ac22..bb98ed049b 100644 --- a/calendar/js/et2_widget_planner.js +++ b/calendar/js/et2_widget_planner.js @@ -1134,8 +1134,7 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e if(!this.options.show_weekend && [0,6].indexOf(t.getDay()) !== -1 ) continue; var holidays = []; var tempDate = new Date(t); - tempDate.setMinutes(tempDate.getMinutes()-start.getTimezoneOffset()); - var day_class = this.day_class_holiday(tempDate,holidays); + tempDate.setMinutes(tempDate.getMinutes()-tempDate.getTimezoneOffset()); var title = ''; var state = ''; @@ -1151,10 +1150,11 @@ var et2_calendar_planner = (function(){ "use strict"; return et2_calendar_view.e { title = this.egw().lang(date('D',t)).substr(0,2)+'
'+date('j',t); } - state = new Date(t.valueOf() - start.getTimezoneOffset() * 60 * 1000).toJSON(); + state = new Date(t.valueOf() - t.getTimezoneOffset() * 60 * 1000); + var day_class = this.day_class_holiday(state,holidays); content += '\n"; } content += ""; // end of plannerScale