From e3afc85fb358b00b09058303039ecaa385c9713b Mon Sep 17 00:00:00 2001 From: Wiktor Wandachowicz Date: Fri, 15 Oct 2021 10:59:27 +0200 Subject: [PATCH] Correct timestamps in database for DST days --- locallib.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/locallib.php b/locallib.php index ac91e65..93ef36b 100644 --- a/locallib.php +++ b/locallib.php @@ -704,7 +704,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'];