Conpherence - fix off by one bug in calendar data fetching
Summary: Ref T3155. "last sunday" is "last sunday at 00:00" so you have to include a day for Sunday itself. Test Plan: calendar renders correctly today - saturday - which is the edge case of this Reviewers: epriestley, chad Reviewed By: chad CC: aran, Korvin Maniphest Tasks: T3155 Differential Revision: https://secure.phabricator.com/D6108
This commit is contained in:
@@ -385,7 +385,7 @@ final class ConpherenceWidgetController extends
|
|||||||
|
|
||||||
$first_day = new DateTime('last sunday', $timezone);
|
$first_day = new DateTime('last sunday', $timezone);
|
||||||
$timestamps = array();
|
$timestamps = array();
|
||||||
for ($day = 0; $day < 8; $day++) {
|
for ($day = 0; $day < 9; $day++) {
|
||||||
$timestamp = clone $first_day;
|
$timestamp = clone $first_day;
|
||||||
$timestamps[] = $timestamp->modify(sprintf('+%d days', $day));
|
$timestamps[] = $timestamp->modify(sprintf('+%d days', $day));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ final class ConpherenceThreadQuery
|
|||||||
$this->getViewer(),
|
$this->getViewer(),
|
||||||
'U');
|
'U');
|
||||||
$end_epoch = phabricator_format_local_time(
|
$end_epoch = phabricator_format_local_time(
|
||||||
strtotime('last sunday +8 days', strtotime('tomorrow')),
|
strtotime('last sunday +9 days', strtotime('tomorrow')),
|
||||||
$this->getViewer(),
|
$this->getViewer(),
|
||||||
'U');
|
'U');
|
||||||
$statuses = id(new PhabricatorUserStatus())
|
$statuses = id(new PhabricatorUserStatus())
|
||||||
|
|||||||
Reference in New Issue
Block a user