Skip to content

Commit

Permalink
fixes #5358 When looking for websites for which the local time, has m…
Browse files Browse the repository at this point in the history
…oved into a new day then we should use the timestamp of the last time the archiving was executed successfully.

Previous code would not work as expected, in case for example: archiving runs once a day around midnight.
  • Loading branch information
mattab committed Jun 18, 2014
1 parent 9f772e7 commit 5ad27d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/CronArchive.php
Expand Up @@ -987,7 +987,7 @@ private function addWebsiteIdsWithVisitsSinceLastRun()
*/
private function getTimezonesHavingNewDay()
{
$timestamp = time() - $this->shouldArchiveOnlySitesWithTrafficSince;
$timestamp = $this->lastSuccessRunTimestamp;
$uniqueTimezones = APISitesManager::getInstance()->getUniqueSiteTimezones();
$timezoneToProcess = array();
foreach ($uniqueTimezones as &$timezone) {
Expand Down

0 comments on commit 5ad27d7

Please sign in to comment.