mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-22 12:41:19 +01:00
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:
parent
0bd8374c63
commit
a20e87bc16
2 changed files with 2 additions and 2 deletions
|
@ -385,7 +385,7 @@ final class ConpherenceWidgetController extends
|
|||
|
||||
$first_day = new DateTime('last sunday', $timezone);
|
||||
$timestamps = array();
|
||||
for ($day = 0; $day < 8; $day++) {
|
||||
for ($day = 0; $day < 9; $day++) {
|
||||
$timestamp = clone $first_day;
|
||||
$timestamps[] = $timestamp->modify(sprintf('+%d days', $day));
|
||||
}
|
||||
|
|
|
@ -225,7 +225,7 @@ final class ConpherenceThreadQuery
|
|||
$this->getViewer(),
|
||||
'U');
|
||||
$end_epoch = phabricator_format_local_time(
|
||||
strtotime('last sunday +8 days', strtotime('tomorrow')),
|
||||
strtotime('last sunday +9 days', strtotime('tomorrow')),
|
||||
$this->getViewer(),
|
||||
'U');
|
||||
$statuses = id(new PhabricatorUserStatus())
|
||||
|
|
Loading…
Reference in a new issue