From 4ee931b20311f7ac8a022b655085c9de0f5de3f5 Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 20 Apr 2017 12:57:04 -0600 Subject: [PATCH] Calendar - Fix recur end date got one day sooner when you save if timezone was Tahiti --- calendar/inc/class.calendar_rrule.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_rrule.inc.php b/calendar/inc/class.calendar_rrule.inc.php index 1685ac8cbb..7f9f9b21f0 100644 --- a/calendar/inc/class.calendar_rrule.inc.php +++ b/calendar/inc/class.calendar_rrule.inc.php @@ -759,7 +759,8 @@ class calendar_rrule implements Iterator if ($event['recur_enddate']) { - $enddate = is_a($event['recur_enddate'],'DateTime') ? $event['recur_enddate'] : new Api\DateTime($event['recur_enddate'],$timestamp_tz); + $enddate = is_a($event['recur_enddate'],'DateTime') ? $event['recur_enddate'] : new Api\DateTime($event['recur_enddate'],self::$tz_cache[$to_tz]); + $enddate->setTime(23,59,59); } if (is_array($event['recur_exception'])) {