diff --git a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php --- a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php +++ b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php @@ -525,6 +525,10 @@ } } + /** + * @param PhabricatorSavedQuery $saved + * @return AphrontFormDateControlValue + */ private function getQueryDateFrom(PhabricatorSavedQuery $saved) { if ($this->calendarYear && $this->calendarMonth) { $viewer = $this->requireViewer(); diff --git a/src/view/form/control/AphrontFormDateControlValue.php b/src/view/form/control/AphrontFormDateControlValue.php --- a/src/view/form/control/AphrontFormDateControlValue.php +++ b/src/view/form/control/AphrontFormDateControlValue.php @@ -209,6 +209,12 @@ ); } + /** + * Create a DateTime object including timezone + * @param string $date Date, like "2024-08-20" or "2024-07-1" or such + * @param string|null $time Time, like "12:00 AM" or such + * @return DateTime|null + */ private function newDateTime($date, $time) { $date = $this->getStandardDateFormat($date); $time = $this->getStandardTimeFormat($time); @@ -280,10 +286,16 @@ } } + /** + * @return DateTime|null + */ public function getDateTime() { return $this->newDateTime($this->valueDate, $this->valueTime); } + /** + * @return DateTimeZone + */ private function getTimezone() { if ($this->zone) { return $this->zone;