diff --git a/lib.php b/lib.php index d75ec2b..1d0e2df 100644 --- a/lib.php +++ b/lib.php @@ -283,7 +283,10 @@ class enrol_ilbead_plugin extends enrol_plugin { $enrol = enrol_get_plugin('ilbead'); $timestart = time(); if ($instance->enrolperiod) { - $timeend = $timestart + $instance->enrolperiod; + $timeend = date("Y/m/d", (string)($timestart + $instance->enrolperiod)); + list($year, $month, $day) = split("/", $timeend); + $timeend = (int)strtotime("$year-$month-$day 23:59:59"); + } else { $timeend = 0; }