- Updates scheduling logic to work with the new normalized DB time

This commit is contained in:
Vlad
2016-03-22 18:26:37 -04:00
parent 7331e5cabd
commit 3b3ccc18ce
3 changed files with 6 additions and 3 deletions

View File

@@ -62,7 +62,8 @@ class SendingQueue {
$queue->newsletter_id = $newsletter->id;
}
$schedule = Cron::factory($newsletter->schedule);
$queue->scheduled_at = $schedule->getNextRunDate()->format('Y-m-d H:i:s');
$queue->scheduled_at =
$schedule->getNextRunDate(current_time('mysql'))->format('Y-m-d H:i:s');
$queue->status = 'scheduled';
$queue->save();
return array(