diff --git a/locallib.php b/locallib.php index 7bcb39b..9dcf0ff 100644 --- a/locallib.php +++ b/locallib.php @@ -847,7 +847,13 @@ function attendance_construct_sessions_data_for_add($formdata, mod_attendance_st } } else { $sess = new stdClass(); - $sess->sessdate = $sessiondate; + $sess->sessdate = make_timestamp( + date("Y", $formdata->sessiondate), + date("m", $formdata->sessiondate), + date("d", $formdata->sessiondate), + $formdata->sestime['starthour'], + $formdata->sestime['startminute'] + ); $sess->duration = $duration; $sess->descriptionitemid = $formdata->sdescription['itemid']; $sess->description = $formdata->sdescription['text'];