From 8736a2203ccb9141d5f55d2acc68144ae8f6e18a 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 78a34c8..e6fa722 100644 --- a/locallib.php +++ b/locallib.php @@ -839,7 +839,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'];