Skip to content

Commit

Permalink
use sites timezone for today/yesterday
Browse files Browse the repository at this point in the history
  • Loading branch information
diosmosis committed Dec 3, 2020
1 parent 4b5a44a commit 52e4ea3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/CronArchive.php
Expand Up @@ -842,7 +842,8 @@ public function invalidateArchivedReportsForSitesThatNeedToBeArchivedAgain($idSi

private function invalidateRecentDate($dateStr, $idSite)
{
$date = Date::factory($dateStr);
$timezone = Site::getTimezoneFor($idSite);
$date = Date::factoryInTimezone($dateStr, $timezone);
$period = PeriodFactory::build('day', $date);

$params = new Parameters(new Site($idSite), $period, new Segment('', [$idSite], $period->getDateStart(), $period->getDateEnd()));
Expand Down

0 comments on commit 52e4ea3

Please sign in to comment.