$rrule = "FREQ=MONTHLY;INTERVAL=12;BYMONTHDAY=2";
$mang = new rrule_manager($rrule);
- $until = time() + (YEARSECS * $mang::TIME_UNLIMITED_YEARS);
+ $untildate = new DateTime();
+ $untildate->add(new DateInterval('P' . $mang::TIME_UNLIMITED_YEARS . 'Y'));
+ $until = $untildate->getTimestamp();
$mang->parse_rrule();
$mang->create_events($this->event);
$rrule = "FREQ=MONTHLY;INTERVAL=12;BYDAY=1MO";
$mang = new rrule_manager($rrule);
- $until = time() + (YEARSECS * $mang::TIME_UNLIMITED_YEARS);
+ $untildate = new DateTime();
+ $untildate->add(new DateInterval('P' . $mang::TIME_UNLIMITED_YEARS . 'Y'));
+ $until = $untildate->getTimestamp();
$mang->parse_rrule();
$mang->create_events($this->event);