Index: course/modedit.php =================================================================== --- course/modedit.php (revision 18952) +++ course/modedit.php (working copy) @@ -312,10 +312,9 @@ $cm->availableuntil = $fromform->availableuntil; $cm->releasecode = ($fromform->releasecode != '') ? $fromform->releasecode : NULL; // The form time is midnight, but because we want it to be - // inclusive, set it to 23:59:59 on that day. + // inclusive, add 23:59:59 to the time (86,399 seconds). if ($cm->availableuntil) { - $cm->availableuntil = strtotime('23:59:59', - $cm->availableuntil); + $cm->availableuntil += 86399; } $cm->showavailability = $fromform->showavailability; condition_info::update_cm_from_form($cm,$fromform,true); @@ -390,10 +389,9 @@ $newcm->availableuntil = $fromform->availableuntil; $newcm->releasecode = ($fromform->releasecode != '') ? $fromform->releasecode : NULL; // The form time is midnight, but because we want it to be - // inclusive, set it to 23:59:59 on that day. + // inclusive, add 23:59:59 to the time (86,399 seconds). if ($newcm->availableuntil) { - $newcm->availableuntil = strtotime('23:59:59', - $newcm->availableuntil); + $newcm->availableuntil += 86399; } $newcm->showavailability = $fromform->showavailability; }