#39 ✓invalid
Bart

Wrong 'Next campaigns to process' time in Dashboard

Reported by Bart | June 28th, 2008 @ 02:57 AM

The function call to calculate this time ignores the localtime settings.

Fix this by changing the call to getCampaignRemaining on line 34 in inc/admin/home.php from:

$cl = $this->getCampaignRemaining($campaign);

to:

$cl = $this->getCampaignRemaining($campaign, get_option('gmt_offset'));

BTW: The function getCampaingRemaining is only used in the Dashboard. The actual processing code performs the same query differently. One of these functions should be eliminated to prevent duplication of code.

Comments and changes to this ticket

  • Guillermo Rauch

    Guillermo Rauch July 18th, 2008 @ 09:58 AM

    • Milestone cleared.
    • State changed from “new” to “invalid”

    Code is not duplicated. The query uses SQL to handle it, like it should.

    And there's no reason to use GMT, since we're substracting the GMT timestamp

    mysql2date('U', $campaign->lastactive) + $campaign->frequency - current_time('timestamp', true) + ($gmt ? 0 : (get_option('gmt_offset') * 3600))

  • Ricardo Rauch

    Ricardo Rauch April 15th, 2010 @ 08:49 AM

    • Assigned user changed from “Guillermo Rauch” to “Ricardo Rauch”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

WP-o-Matic project.

People watching this ticket

Pages