'int', )); } public function getNextEventEpoch($last_epoch, $is_reschedule) { $start_epoch = $this->getProperty('start'); if (!$last_epoch) { $last_epoch = $start_epoch; } $start = new DateTime('@'.$start_epoch); $last = new DateTime('@'.$last_epoch); // NOTE: We're choosing the date from the last event, but the time of day // from the start event. This allows callers to change when the event // occurs by updating the trigger's start parameter. $ymd = $last->format('Y-m-d'); $hms = $start->format('G:i:s'); $next = new DateTime("{$ymd} {$hms} UTC"); // Add a day. // TODO: Use PHP's DateInterval instead which exists since PHP 5.3.0 $next->modify('+1 day'); return (int)$next->format('U'); } }