1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02: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:
Bob Trahan 2013-06-01 10:20:13 -07:00
parent 0bd8374c63
commit a20e87bc16
2 changed files with 2 additions and 2 deletions

View file

@ -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));
}

View file

@ -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())