diff --git a/db/upgrade.php b/db/upgrade.php index 1a42655..01d2f26 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -367,7 +367,7 @@ function xmldb_local_treestudyplan_upgrade($oldversion) { for($i=0; $i < $pcount; $i++){ $pnum = $i+1; $pstart = $ystart + ($i*$ptime); - $pend = $pstart + $ptime; + $pend = ($pstart + $ptime)-(24*60*60); // minus one day $o = [ "page_id" => $r->id, "period" => $pnum,