This commit is contained in:
Prospress Inc
2016-09-08 09:19:32 +02:00
committed by I
parent 084aa2976e
commit 3c13d0a95f
26 changed files with 776 additions and 483 deletions

View File

@@ -20,12 +20,12 @@ class ActionScheduler_IntervalSchedule implements ActionScheduler_Schedule {
* @return DateTime|null
*/
public function next( DateTime $after = NULL ) {
$after = empty($after) ? new DateTime('@0') : clone($after);
$after = empty($after) ? as_get_datetime_object('@0') : clone $after;
if ( $after > $this->start ) {
$after->modify('+'.$this->interval_in_seconds.' seconds');
return $after;
}
return clone( $this->start );
return clone $this->start;
}
/**
@@ -50,7 +50,7 @@ class ActionScheduler_IntervalSchedule implements ActionScheduler_Schedule {
}
public function __wakeup() {
$this->start = new DateTime('@'.$this->start_timestamp);
$this->start = as_get_datetime_object($this->start_timestamp);
}
}