Browse Source

Fixes #176 Generate correct timestamp including DST changes.

MOODLE_29_STABLE
Dan Marsden 9 years ago
parent
commit
05cc196b58
  1. 3
      sessions.php

3
sessions.php

@ -263,7 +263,8 @@ function construct_sessions_data_for_add($formdata) {
$dinfo = usergetdate($sdate); $dinfo = usergetdate($sdate);
if (isset($formdata->sdays) && array_key_exists($wdaydesc[$dinfo['wday']], $formdata->sdays)) { if (isset($formdata->sdays) && array_key_exists($wdaydesc[$dinfo['wday']], $formdata->sdays)) {
$sess = new stdClass(); $sess = new stdClass();
$sess->sessdate = usergetmidnight($sdate) + $sesstarttime; $sess->sessdate = make_timestamp($dinfo['year'], $dinfo['mon'], $dinfo['mday'],
$formdata->sestime['starthour'], $formdata->sestime['startminute']);
$sess->duration = $duration; $sess->duration = $duration;
$sess->descriptionitemid = $formdata->sdescription['itemid']; $sess->descriptionitemid = $formdata->sdescription['itemid'];
$sess->description = $formdata->sdescription['text']; $sess->description = $formdata->sdescription['text'];

Loading…
Cancel
Save