From 7c37377e0d619434a3395bb15716a02dfd635463 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 2 Dec 2016 04:54:43 -0800 Subject: [PATCH] Set the viewer timezone properly on Calendar event RecurrenceSet objects Summary: Ref T11801. In some cases, this could lead to us failing to generate the first recurrence in a series. Test Plan: Imported `weekly.ics` (from D16974) and saw an event correctly occur on Aug 18, with my local timezone set to "America/Los_Angeles". Reviewers: chad Reviewed By: chad Maniphest Tasks: T11801 Differential Revision: https://secure.phabricator.com/D16975 --- .../calendar/storage/PhabricatorCalendarEvent.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/applications/calendar/storage/PhabricatorCalendarEvent.php b/src/applications/calendar/storage/PhabricatorCalendarEvent.php index 75d573c79e..5b64fdea53 100644 --- a/src/applications/calendar/storage/PhabricatorCalendarEvent.php +++ b/src/applications/calendar/storage/PhabricatorCalendarEvent.php @@ -1024,6 +1024,10 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO $set = new PhutilCalendarRecurrenceSet(); + if ($this->viewerTimezone) { + $set->setViewerTimezone($this->viewerTimezone); + } + $rrule = $this->newRecurrenceRule(); if (!$rrule) { return null;